Re:Checked C
by jcranmer on Wednesday December 21, 2022 @06:03PM
(#34087555)
MSVC supports a substantial amount of C99, C11, and C17, but they don't support the features that were made optional in C11 (i.e., variable-length arrays).
[ Parent
| on HN ]
> MSVC supports a substantial amount of C99, C11, and C17, (...)
Supporting only some features of a spec means that they do not conform with the spec.
Msvc is still stuck with C89, and it won't budge.
Funny, Microsoft seems to disagree with you: https://devblogs.microsoft.com/cppblog/c11-and-c17-standard-...
> For many years Visual Studio has only supported C to the extent of it being required for C++. Things are about to change now that a conformant token-based preprocessor has been added to the compiler. With the advent of two new compiler switches, /std:c11 and /std:c17, we are officially supporting the latest ISO C language standards.
> All the required features of C11 and C17 are supported.
The spec has made those features optional, compliance doesn't require optional features, that is why they are optional.
By a substantial amount, do you mean the parts that overlap with C++? I recall reading something about Microsoft only caring about C++ support, such that anything in C that is not in C++ is unlikely to ever be implemented in their compiler, despite other compilers having no issue doing this.
There's a few things in C that are not in C++ that MSVC added. Designated initializers and type-generic macros are two features that come to mind, and I believe MSVC also supports C99 restrict. The only non-optional C11 feature I can think of that MSVC doesn't support these days is _Atomic.