Sujet : Re: Casting the return value of ...
De : david.brown (at) *nospam* hesbynett.no (David Brown)
Groupes : comp.lang.cDate : 31. Mar 2024, 14:44:00
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <uubpb0$1qgfe$1@dont-email.me>
References : 1 2 3 4 5 6
User-Agent : Mozilla Thunderbird
On 31/03/2024 00:05, Lawrence D'Oliveiro wrote:
On Sat, 30 Mar 2024 19:29:50 GMT, Scott Lurndal wrote:
We write production code not standard C (or in this
case, C++) code. Portability to compilers other than gcc is
not a requirement for the several million line codebase.
Interesting. Has GCC become the de-facto-standard C compiler?
gcc is the most commonly used compiler on Linux and in embedded systems. It is not the most common on Windows, AFAIK - that honour goes to MSVC. A number of gcc extensions, practices and flags have been copied by other compilers (such as clang, icc, and others). A number of features that started off as gcc extensions ended up in the C standards - more, I think, than for extensions of any other compiler.
If you consider that to mean gcc is the "de-facto-standard C compiler", that's up to you - it is not the standard C compiler in the context of comp.lang.c, where "standard" refers to the C standards, since there is no C standard reference compiler. But the term "de-facto standard" is so vague and poorly defined that you can use it any way you like, without conveying any useful information.
I can't speak for Scott, but in my work I happily use gcc extensions (though I don't use them when standard C does as good a job). I don't do that because it is a "de-facto standard" or anything of the sort - I use gcc extensions when they let me write better code or give better results, since my code does not normally have to be portable to other compilers. If I happen to be working on a project that uses a different compiler, I'll happily use extensions for that compiler too.