GCC has resisted modularity for a while because of concerns about enabling proprietary plugins; an unfortunate case of letting ideology come before technical excellence. This left a big unmet need and put LLVM in a stronger position to displace GCC purely on technical merit, by offering this capability that GCC didn't want to offer.
Reading that article from lwn.net is amazing. The irony of the gcc community users screwing over their customers in order to preserve their ideology, and its parallel in the 'commercial' software business is really amazing. Seriously. "We won't make plug-ins because that would open the door to making money on GCC" vs "We require a key disk to prevent folks from copying our software and using it for free."
I'm really happy to see this sort of discussion happening within the GCC project. While LLVM/Clang are nicer and more usable than GCC in a lot of ways, in my experience GCC is still much more mature, generates better code, and has been implementing features new features from C++11 more quickly. I also like that GCC, glibc, and the GNU libstdc++ are all developed together so that as the compiler implements new optimizations and language features, the runtime environment also takes advantages of those features. I've been impressed with the last few GCC releases (I'm already using 4.7 for my own work).
Competition is good, and it's great to see that GCC development is going strong.
Small world, Dave and I just ran into issues related to this a week ago (I suppose it may have motivated his email). Namely that there was no single API to get the assembler generated for an RTL (register-transfer-language, GCC's final IR) node without going through some destructive APIs.
Is there a reason I should care about GCC anymore? Admittedly, I mostly code ObjC on OS X, where GCC is no longer relevant, but LLVM seems to have leapfrogged GCC so dramatically that I'm unsure why I would even care about GCC.
LLVM integrates better with tools, has an amazing static analyzer, and AFAIK generates code that is on average as fast and small as GCC. (I believe who wins depends on the code.)
I'd say that in 9 out of 10 GCC creates faster code than LLVM/Clang (I see typically 5-10% difference in performance oriented code), add to this that LLVM/Clang lacks strong special optimization strategies like PGO (profile guided optimization) then it's a clear win for GCC. GCC also supports more languages and architectures than Clang which simply mirrors the needs of Apple (ObjC, C, C++). If you are on OSX then yes, there's likely little reason for you to use GCC since OSX ships with a (5 year?) old GCC version and also obviously because Clang/LLVM integrates much better with Apple's proprietary XCode.
That said I use both, and at work we test our code against both toolchains (and some other compilers aswell). The static analyser in Clang is a welcome addition and the error diagnostics/reporting is top notch so it certainly has strong features even though it falls behind GCC in code optimization.
Is there a reason I should care about LLVM anymore? I mean, I mostly code C and C++ on Linux, where no distros build with LLVM and it isn't yet relevant.
Yawn. LLVM seems nice. When it competes on merit in the big world instead of in a sandbox people will care more I guess. Last I tried building my C++ project with it, it puked on the STL headers.
We already have llvm as a c++ monster(hundreds or thousands of MBytes on my mac), witch is modular, and have a more permissive license.
So you are going to risk the only advantages of gcc,(written in c and relatively small and stability), so you could copy the new kid on the block?
If you are going to copy them, copy the more permissive license. It will give commercial companies like Apple the option to improve your software like they do with llvm(Apple hired llvm creator).
[+] [-] haberman|14 years ago|reply
http://lwn.net/Articles/301135/
[+] [-] ChuckMcM|14 years ago|reply
[+] [-] eklitzke|14 years ago|reply
Competition is good, and it's great to see that GCC development is going strong.
[+] [-] loeg|14 years ago|reply
"GCC 5?" http://gcc.gnu.org/ml/gcc/2012-03/msg00256.html "GCC 5 & modularity": http://gcc.gnu.org/ml/gcc/2012-03/msg00263.html
[+] [-] moonchrome|14 years ago|reply
[+] [-] wmf|14 years ago|reply
[+] [-] kingkilr|14 years ago|reply
[+] [-] mdiep|14 years ago|reply
LLVM integrates better with tools, has an amazing static analyzer, and AFAIK generates code that is on average as fast and small as GCC. (I believe who wins depends on the code.)
[+] [-] gillianseed|14 years ago|reply
That said I use both, and at work we test our code against both toolchains (and some other compilers aswell). The static analyser in Clang is a welcome addition and the error diagnostics/reporting is top notch so it certainly has strong features even though it falls behind GCC in code optimization.
[+] [-] ajross|14 years ago|reply
Yawn. LLVM seems nice. When it competes on merit in the big world instead of in a sandbox people will care more I guess. Last I tried building my C++ project with it, it puked on the STL headers.
Use what you like.
[+] [-] stock_toaster|14 years ago|reply
[+] [-] sanxiyn|14 years ago|reply
https://fedorahosted.org/gcc-python-plugin/
[+] [-] mmisu|14 years ago|reply
Making the project more modular, while not a bad idea in itself, could potentially delay the implementation of the latest standards.
[+] [-] forgottenpaswrd|14 years ago|reply
We already have llvm as a c++ monster(hundreds or thousands of MBytes on my mac), witch is modular, and have a more permissive license.
So you are going to risk the only advantages of gcc,(written in c and relatively small and stability), so you could copy the new kid on the block?
If you are going to copy them, copy the more permissive license. It will give commercial companies like Apple the option to improve your software like they do with llvm(Apple hired llvm creator).
[+] [-] berkut|14 years ago|reply
LLVM + Clang source code: 9.9MB + 6MB = C, C++ and Obj-C compiler and linker
GCC source = 69MB = just C compiler and linker
G++ source = 6.6MB = C++ additions to GCC
So I'm curious as to where you're getting the "hundreds or thousands of MBytes on my mac" from.