Path: ...!news.mixmin.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: David Brown Newsgroups: comp.arch Subject: Re: Computer architects leaving Intel... Date: Sun, 15 Sep 2024 21:03:00 +0200 Organization: A noiseless patient Spider Lines: 47 Message-ID: References: <2024Aug30.161204@mips.complang.tuwien.ac.at> <86r09ulqyp.fsf@linuxsc.com> <2024Sep8.173639@mips.complang.tuwien.ac.at> <2024Sep10.101932@mips.complang.tuwien.ac.at> <2024Sep11.123824@mips.complang.tuwien.ac.at> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Sun, 15 Sep 2024 21:03:01 +0200 (CEST) Injection-Info: dont-email.me; posting-host="0f814bd11c9fbe5b78942ec153f06f57"; logging-data="2428933"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/a/bnYSZI38SnBDlS92dmmOdHjFVGkRzo=" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:j5M+xIARhzJUb3IT20n7TXcCX/g= Content-Language: en-GB In-Reply-To: Bytes: 3672 On 13/09/2024 17:55, Thomas Koenig wrote: > David Brown 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.