3 ms·
Ubuntu is already considering switching. Most people don't develop with "GCC in mind". They just target it, but now that there's another compiler that compiles
by avar 16y ago
Ubuntu is already considering switching. Most people don't develop with "GCC in mind". They just target it, but now that there's another compiler that compiles almost all GCC C out there the cost of switching is very low.
- StavrosK 16y agoI'm not too familiar with C, but don't compilers have to adhere to the standard? Is the issue developers who depended on GCC-specific behaviour for things the standard doesn't document?
- obneq 16y agosome things are left undefined by the standard, here compiler implementors can do what they will. Another thing are GNU specific extensions, not only in GCC, leading to GNUisms in many scripts and sources. LLVM supports many GNU extensions.
- riffraff 16y agogcc, like other compilers, has it's own documented extensions which are used in many projects (such as the linux kernel, but also many interpreters/vms using direct threading for example). The clang devs try to support them nonetheless for compatibility, except, for what I understand, a few that are explicitly unsupported by design.
- avar 16y agoCompilers are free to implement extensions if they want. A lot of programs depend on GCC extensions, so you'd never be able to compile e.g. a modern Linux distro with just an ANSI C compiler.
- sp332 16y agoThe standard just means that if you write "standard C", the compiler will work as expected (for some reasonable value of expected). But compilers can add extensions, and GCC has a long list of extensions. The Linux kernel uses these GCC-specific features a lot! Here's a list of extensions, if you're curious... http://linuxdevcenter.com/pub/a/linux/excerpts/9780596009588/gcc-extensions-to-the-c-language.html http://linuxdevcenter.com/pub/a/linux/excerpts/9780596009588...
- StavrosK 16y agoI see, thank you. I wasn't aware that these were compiler-specific extensions.