Clang was released alongside MacOS X 10.6, which came with no less than 3 compilers – GCC 4.2 (Apple modified), LLVM-GCC, and Clang. With 10.7 Lion, Apple has dropped their version of GCC 4.2 entirely. LLVM-GCC and Clang are both present, but Apple has made clear that LLVM-GCC will be going away just as soon as Clang’s C++ support is ready for prime-time.
So as of MacOS X 10.7 Lion, Apple’s Xcode includes 2 compilers – Clang and LLVM-GCC. There are also versions of the commercial Intel C++ compiler, the standard Free Software Foundation version of GCC, and a small research project based on the original BSD Unix compiler pcc (Portable C Compiler) which are available.
Clang – Currently the Apple-blessed compiler for OS X, Clang offers excellent Xcode integration, helpful error messages, fast compile times, and pretty decent code. The main downside is that it still has a few more bugs compared to more mature options. Clang can also be built on Linux and many other platforms. It requires LLVM as it’s back-end. The current version is 3.0.
LLVM-GCC – Kept around by Apple for compatibility reasons, LLVM-GCC probably won’t be around much longer. It does have the advantage of offering a more mature front-end than Clang, while still giving access to the LLVM optimizers. It will also work on Linux and on most other UNIX platforms. The current version is 3.0 (the front-end is 4.2).
(FSF) GCC - The official FSF-sanctioned GNU Compiler Collection is no longer supported by Apple, meaning you have to build and install it yourself. It offers the most mature front-end of the open-source options, and in most benchmarks it generates the best code. On the flip side, it is generally slower to compile than the others, and has some of the less helpful error messages. It can be built on just about any platform – Linux, UNIX and Windows. The current version is 4.6.
Intel C/C++ – Intel’s compilers on MacOS X are a straight-off port of their Linux tools. It’s a commercial tool, but they do have a 30-day demo available for download. Naturally, performance is heavily tuned for the latest Intel processors. On the whole, it seems to produce slightly better code than GCC, although for specific computational tests, it may have more significant advantages (automatic vectorization support for example is quite good). The compiler uses the EDG front-end, and offers the same language extensions that GCC does. It is also available for Linux and Windows. The current version is 12.0 (confusingly labeled 2011).
PCC – Based on the original BSD C compiler, the Portable C Compilerß is small, reasonably fast, and can build most simple programs. It doesn’t have the many language extensions that GCC or the others do, and it doesn’t do C++. It can be built on most UNIX platforms. The current version is 1.0.