3 ms·
GCC is becoming larger and more unmaintainable with each release. Competition in this space has been pretty sorely lacking for quite some time. The OpenBSD fo
by getsat 15y ago
GCC is becoming larger and more unmaintainable with each release. Competition in this space has been pretty sorely lacking for quite some time. The OpenBSD folks are also pushing PCC as a GCC alternative.
It'll be nice to have a BSD-licenced GCC equivalent for distribution with FreeBSD/OpenBSD, too.
Clang also has REALLY great error messages compared to GCC. It will tell you exactly where you forgot a comma, semicolon, quote, etc. instead of randomly pointing to some line around the error in question.
- cliffbean 15y agoIt is useful to keep in mind a common confusion. Apple and various BSD's stopped updating GCC around version 4.2, the last GPLv2 version, which is approximately 4 years old now. For people who only develop on those platforms, this is what "GCC" means. So when someone from Apple or someone with an obvious BSD bias talks about how much better clang is than "GCC", they're usually talking about how much better clang is than an old unmaintained version of GCC. clang does have strengths, but when we make comparisons, we should be clear about what it is we're comparing.
- nknight 15y agoUnless there's been a concerted effort in the last ~year or so to improve GCC's error messages and compilation speed, clang's primary technical strengths remain unchanged relative to GCC. Saying we're comparing old versions isn't really useful unless the new versions have actually addressed the relevant issues.
- cliffbean 15y agoRecent versions of GCC do, in fact, have improved error messages. For example, GCC 4.6 fixed a problem that the post I was replying to mentioned, where a missing semicolon after a struct definition would cause GCC to elicit an error message pointing to some other nearby line. If you're comparing clang to just GCC 4.2, then say that. If you've compared it with recent versions of GCC too, then say that.
- adbge 15y ago$ gcc -v ... gcc version 4.6.2 20120120 (prerelease) (GCC) When it comes to diagnostics, GCC isn't even competitive.
- gillianseed 15y agoWell Clang/LLVM is also becoming larger with each release. As for GCC becoming more 'unmaintainable', can you point me to anything supporting that notion? It's certainly not unmaintainable now as proven by them regularly releasing new improved versions which serve as the de facto compiler toolchain for open source systems. Also when speaking of GCC and how old and full of cruft it is, you need to realize that it's code base is being continously improved with each new release with a strong focus on modularity. It's not the same codebase as it was back in 1987. I'm very happy Clang/LLVM exists and progressing at a great pace as I see increased availability of open source compiler toolchains as something awesome. Also LLVM really does have some great features like the best-in-class error reporting and it also serves an undeniable purpose as a jit framework for numerous projects. That said I don't understand those trying to push the idea of GCC being obsolete (unless they are nurturing some political/licence based crusade) as it's a very mature compiler toolchain targeting a large number of architectures and (atleast for me) quite importantly generating faster code than Clang/LLVM. Also the notion that companies would be afraid of GCC strikes me as odd given that we have Red Hat, IBM, Google, CodeSourcery, Suse etc employing full-time GCC developers. I hope to see these compiler toolchains continously going neck to neck in the future and thus provide the open source ecosystem with two first class options each with their respective strenghts.
- Someone 15y ago"the notion that companies would be afraid of GCC strikes me as odd given that we have Red Hat, IBM, Google, CodeSourcery, Suse etc employing full-time GCC developers." Afraid? I expect that these companies have spent serious money on lawyers to figure out whether GPL 3 was acceptable for them before committing to it. Also, Mac OS supports OpenCL (http://en.wikipedia.org/wiki/OpenCL http://en.wikipedia.org/wiki/OpenCL). One could argue that that makes the compiler more a part of the OS than "just another application that runs on it". If they used GPL code there, a perceived risk could be that they could be forced to make their OS GPL.