No. It's designed that way. The GCC-specific code isn't an accident or oversight.
Nope. Linux is specifically targetting GCC as it's compiler.Quote:
Shouldn't it be ANSI/ISO-compatible?
Printable View
Yeah, and be standardized in C25 in 2025...
I heard a few years ago that Microsoft c++ compiler kicks g++ compiler ass. Is this statement still correct? Or was it incorrect even back then?
hahahahahahahhahahaha good fucking luck, buddy. :)
(For more context, Microsoft does not support or enhance their C compiler anymore, which hasn't been able to compile many modern C codebases in ages. It's stuck at the 23-year-old C89 standard and is receiving zero further development support. Microsoft tells anyone who runs into problems to compile as C++ or to go find another compiler vendor. I'd be mildly surprised if Microsoft's compiler can even successfully parse more than 25% of the headers in Linux or even a single source file.)
Many of the extensions are just not really general-C kinds of things. http://gcc.gnu.org/onlinedocs/gcc/C-Extensions.html - if you look through that list, and especially at the ones the Linux kernel depends on, they're not really applicable in the kind of general sense that C prefers. Some of them place extra restrictions on the compiler's code generator which would make them unusable on "small system" C compilers, others are very tightly bound to the linker and require an ELF-like system, some are hardware or platform specific, some are specific to GCC's internals, and yet others are just of dubious nature that may have already been superceded by C11 or C++ equivalents. (Note that many of those extensions actually are just C99 or C11 features, with the "extension" part being that GCC accepts them even when compiling in older standards modes.)Quote:
Maybe those GCC-specific extensions should be sent to ISO for standarization.