Developing In C/C++? Why You Should Consider Clang Over GCC (dice.com)
Nerval's Lobster writes: The idea with Clang, a compiler front-end for C, C++, Objective-C++, and Objective-C, and LLVM (a compiler infrastructure) is that you can mix the compiler front-end with a targeted back-end and end up with highly portable and efficient compiler. Clang can perform static analysis of your code, and lets you write tools that give you information about a program. Although many developers prefer developing in C/C++ using GCC, developer David Bolton (in a new Dice article) makes an argument for why you should switch to Clang. While GCC is probably still best when it comes to speed, he argues, Clang is improving release by release, and features tools that developers could find useful.
To make sure my code is not using any compiler features I compile my code on both.
I would think that if these subtle bugs exist they'd be caught by the test suites. Do you have any actual evidence of these subtle bugs?
This is because of the licence: it turns out that corporations like Apple are more willing to provide developer resources for this open source project if the licence isn't copyleft.
That's not really true, Apple contributed to GCC for years before LLVM. The problem was that Apple wanted features, and GCC wouldn't allow those features to be built. So finally Apple just gave up and built their own.
This is the rule of running an open source project (and Linus does a really good job of it): give users what they want, or the users will leave.
"First they came for the slanderers and i said nothing."
> I can't see any rational reason to prefer Gcc.
1) Long term Freedom. The importance of which can not and should not be understated.
2) If you're developing with multi-architecture in mind. Good luck using Clang/LLVM outside of x86/ARM.
I remember the bad old days of working with proprietary C compilers on embedded platforms. It makes me shudder. Clang/LLVM allows this. Never again.