Sujet : Re: Computer architects leaving Intel...
De : david.brown (at) *nospam* hesbynett.no (David Brown)
Groupes : comp.archDate : 15. Sep 2024, 20:03:00
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vc7b15$2a405$2@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14
User-Agent : Mozilla Thunderbird
On 13/09/2024 17:55, Thomas Koenig wrote:
David Brown <david.brown@hesbynett.no> schrieb:
>
Most of the commonly used parts of C99 have been "safe" to use for 20
years. There were a few bits that MSVC did not implement until
relatively recently, but I think even have caught up now.
What about VLAs?
I don't know if MSVC has VLAs - it's not a tool I ever use, so I don't have the details in my head.
But perhaps VLAs don't count as "commonly used parts of C99". I have only occasionally had use for real VLAs in my own programming (more often I have local arrays whose size is a const known at compile time, but not syntactically a constant expression - then you have something that is technically a VLA but which the compiler can handle just like a normal fixed size array). A lot of people seem to get in a fluster when you talk about VLAs, and think their inclusion in the C standards was inspired by the demons trying escape people's noses.
There are a few more obscure parts of C99 that are often poorly implemented, such as some of the floating point details, and many embedded compilers omit much of the wide character stuff.
I suppose you could argue that my claim is tautological - parts of C99 that are not implemented in the mainstream C compilers will of course not be commonly used!
There are only two serious, general purpose C compilers in mainstream
use - gcc and clang, and both support almost all of C23 now. But it
will take a while for the more niche tools, such as some embedded
compilers, to catch up.
It is almost impossible to gather statistics on compiler use,
especially with free compilers, but what about MSVC and icc?
MSVC is rarely used for C - it is primarily a C++ tool. Traditionally, you have had closer to modern C support using MSVC in C++ mode than in C mode.
As for icc, I don't think it is nearly as popular as it used to be, but I have no statistics to back that up. However, I believe it has kept up with the standards (as well as compatibility with many of gcc and clang's extensions). I don't know about C23 support.