Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
sigsev_251
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
7 ms
·
31.
▲
Memory-Safety in C [pdf]
(open-std.org)
3 points
by
sigsev_251
3y ago
|
0 comments
32.
▲
by
sigsev_251
3y ago
Well, good news, there is a new proposal [1] arguing for their inclusion in the language. You can express your support for it to the committee. [1]: https://open-std.org/JTC1/SC22/WG14/www/docs/n3194
33.
▲
by
sigsev_251
3y ago
Well there is a reason for that. The A ... B syntax requires that you use spaces between A, the three dots and B, else it will be lexed as a single number. C is supposed to ignore whitespace, it wouldn't make sense to add a feature tha
34.
▲
by
sigsev_251
3y ago
If only there was a way to write generic logic to complement this feature...
35.
▲
by
sigsev_251
3y ago
What's even funnier is that for STM8 one can choose between four compilers, all offering first class citizen support for the platform. Also, it's pretty convenient that two of them, namely IAR and SDCC, support the current languag
36.
▲
Transparent Aliases
(thephd.dev)
2 points
by
sigsev_251
3y ago
|
0 comments
37.
▲
_Optional: A type qualifier to indicate pointer nullability [pdf]
(open-std.org)
2 points
by
sigsev_251
3y ago
|
1 comments
38.
▲
N3188: Identifying Array Length State
(open-std.org)
1 points
by
sigsev_251
3y ago
|
0 comments
39.
▲
Operator overloading without name mangling [pdf]
(open-std.org)
3 points
by
sigsev_251
3y ago
|
0 comments
40.
▲
Improved `__attribute__((cleanup))` through `defer`
(thephd.dev)
4 points
by
sigsev_251
3y ago
|
1 comments
41.
▲
Semantic Basis for Overloading in C
(open-std.org)
3 points
by
sigsev_251
3y ago
|
0 comments
42.
▲
by
sigsev_251
3y ago
I mean, the annotations are supposed to be simple C attributes wrapped in macros, so even them are just C
43.
▲
by
sigsev_251
3y ago
Integer promotion will probably never be removed from the fundamental types (char, signed char, short, etc.). You can use `_BitInt`(N) types in the future which don't follow the implicit integer promotion rule. There are at least two c
44.
▲
Preprocessor Embed Support for Clang
(github.com)
1 points
by
sigsev_251
3y ago
|
0 comments
45.
▲
by
sigsev_251
3y ago
It's not just gcc, they are in the C23 standard along with the _Decimal<size> types.
46.
▲
by
sigsev_251
3y ago
C11 threads are now available in VS preview, so there is still hope, though one can't be sure for anything in these times (it's still funny that tcc has support for VMTs and MSVC doesn't). As for the fat pointer discussion, i
47.
▲
by
sigsev_251
3y ago
The question is whether the fat pointer types will be useful and accesible enough for developers to migrate to them from the pointer+size combination. VMTs, which are considered the current best practice (recommended by CERT too), have a ba
48.
▲
by
sigsev_251
3y ago
K&R functions were removed from the standard in C23. That function declaration means the same thing now in both languages.
49.
▲
by
sigsev_251
3y ago
The extension was the reference implementation of the TS. As for its uses, IBM was the main organisation to push for this (they implemented DFP extension on gcc too) so I guess their customers (most probably on the mainframe business) have
50.
▲
N3171: C Requests for Implementation [pdf]
(open-std.org)
4 points
by
sigsev_251
3y ago
|
0 comments
51.
▲
by
sigsev_251
3y ago
I don't doubt that Swift is a safer language (and probably better for modern projects) but how can a team migrate to it when Apple refuses to improve support for non-Apple platforms?
52.
▲
C11 Threads in Visual Studio 2022 version 17.8 Preview 2
(devblogs.microsoft.com)
2 points
by
sigsev_251
3y ago
|
0 comments
53.
▲
by
sigsev_251
3y ago
Then why not use the standard attribute syntax with a custom namespace (for example `[[xr0::alloc(result)]]`)? Compilers ignore attributes they do not implement (They may issue a warning, but one can either turn off that warning, or use mac
54.
▲
by
sigsev_251
3y ago
> A non-null fin reference will transpile to a C99 pointer. The non-null aspect is for fin code. Why not use the foo[static 1] trick, it's literally a standard non null pointer (and many C compilers issue diagnostics when someone tr
55.
▲
by
sigsev_251
3y ago
Looks really nice! Some questions: - What does a non-null reference compile to? An array parameter with at least 1 object ([static 1])? - Will fin support Variably Modified Types? - Does fin understand _Generic and static_assert (extremely
56.
▲
by
sigsev_251
3y ago
You don't really have to use a pointer in modern C. The recommended practice is to use variably modified types these days[1]. [1]: https://gustedt.wordpress.com/2014/09/08/dont-use-fake-matri...
57.
▲
by
sigsev_251
3y ago
From my experience, while many MCUs have settled for the big compilers (GCC and Clang), DSPs and some FPGAs (not Intel and Xilinx, those have lately settled for Clang and a combination of Clang and GCC respectively) use some pretty bespoke
58.
▲
by
sigsev_251
3y ago
Regarding locale, let's hope that the text conversion API makes it in the next version so we can all work in unicode and be happy.
59.
▲
by
sigsev_251
3y ago
Isnt't it stdc_count_ones?
60.
▲
by
sigsev_251
3y ago
_Generic allows for more complex assertions in static_assert which is really useful for correctness (For example, your embedded chip vendor offers an API where uint8_t is used to transfer bytes using a protocol, so you have to assert that u
More ›