4 ms·
Oh I thought that was a C99 addition? It's been a while since I've used them. Edit: struggling to find a source, though this GCC doc suggests it's C99 (but may
by anitil 2y ago
Oh I thought that was a C99 addition? It's been a while since I've used them.
Edit: struggling to find a source, though this GCC doc suggests it's C99 (but maybe that's only GCC?) - https://gcc.gnu.org/onlinedocs/gcc/Designated-Inits.html https://gcc.gnu.org/onlinedocs/gcc/Designated-Inits.html
- AlotOfReading 2y agoIt was C99. It took C++ 21 years to copy it.
- eqvinox 2y agoIt's been the primary and most annoying interop issue for us when we have to integrate C++ code into our primarily C codebase (= build some pieces of our code in C++, which necessarily has to interact with at least our header files). (Second place: differences in available GCC/clang compiler extensions between C and C++ [our software does not support Windows/MSVC], third place: differences in what casts are permitted/how they are done)
- uecker 2y agoMy number one issue are VLA parameters int foo(int N, char buf[N]); which I like to use because they improve warning messages, but they are not accepted in C++.
- Cyph0n 2y agoWell, C is not the same as C++. It even says in that doc that “this extension is not implemented in C++”.
- anitil 2y agoYeah sorry in my head I assumed that it would have been adopted