Having a standalone GCC installer is a nice option (especially if you have an Air with limited disk space), but if you want to avoid the hassle of debugging the occasional compilation failure, Xcode is the way to go.
The default GCC installed by Xcode is no longer GCC you expect it too be, it's actually a hybrid of LLVM and GCC
/usr/bin/gcc --version i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1
A non-hybrid version in installed at:
/usr/bin/gcc-4.2 --version i686-apple-darwin11-gcc-4.2.1 (GCC) 4.2.1
It's a rather important change to GCC on mac, it even broke `brew install mysql` for awhile:
https://github.com/mxcl/homebrew/issues/6277
Some great hackers found out it was linking to Apple's internal pthread library.
Code-softly hackers.