5 ms·
One of the interesting news is that they are now going to start requiring a C99 compiler, instead of only C90. I've been considering to do the same on my own p
by ufo 7y ago
One of the interesting news is that they are now going to start requiring a C99 compiler, instead of only C90.
I've been considering to do the same on my own projects. What does HN have to say about this? Is anyone here still working in a context where C99 is not an option? Did anyone else also recently switch to C99? How did it go?
- brudgers 7y agoWhy? Not being facetious. Wondering about the weights of benefits versus costs for users.
- codr7 7y agoMostly portable implementations of extensions for me; __thread, bool, inttypes.h, variadic macros, flexible array members etc. But declaring variables closer to the point of use is nice, as is struct initializers, compound literals and single line comments. Compared to the rest, C99 contains a lot of useful improvements.
- deleted 7y ago[deleted]
- kick 7y agoThe only real cost is that Windows users will have a slightly less convenient time, which doesn't matter for most projects.
- CJefferson 7y agoThe only modern problem with switching to C99 is Visual Studio on Windows. You have 2 sensible choices: 1) Use clang to build on Windows. 2) Use the subset of C99 which is implemented in Visual Studio (which also requires compiling as C++, which isn't that difficult to handle).
- gdxhyrd 7y ago3) Use C++17 with minimal features. This gives you a lot of needed libraries built-in and it is better supported than C99 (due to Windows).
- cesarb 7y agoIt's now 2019, and as far as I know, MSVC still doesn't have full support for the 20-year-old C99 standard. So either you restrict yourself to the subset of C99 which MSVC understands (AFAIK, newer MSVC releases understand more and more of the C99 standard), or just decide MSVC is no longer relevant (which is easier now that clang-cl exists; some big projects like Firefox and Chrome went this way, see for instance https://blog.mozilla.org/nfroyd/2019/04/25/an-unexpected-benefit-of-standardizing-on-clang-cl/ https://blog.mozilla.org/nfroyd/2019/04/25/an-unexpected-ben...).
- ksec 7y agoI sometimes wonder if someday Microsoft would actively contribute to LLVM.