If you run:

'cc --version' 


'c++ --version' 

on a modern OS X with XCode and the command line tools installed (in my case, Mountain Lion with XCode 4.6.x) you will see that the default C compiler and C++ compiler are clang. At some point previously, it was GCC.

I'd like to know: is the change to clang as default attached to the OS revision (e.g. 10.6 vs 10.7), the XCode revision (e.g. 4.5 vs 4.6), some hybrid of the two, or something else altogether?

1 Answer 1


Xcode version

With a recent release of Xcode, the default compiler was changed from GCC (like you said) to LLVM (clang) - a more modern compiler, with more error options.

It has nothing whatsoever to do with your OS X version.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .