Many of my projects must support previous Mac OS X versions including at least 10.3, and in order to do that I have to make sure the PowerPC version is built with GCC version 3.3 rather than 4.x or the app fails to load on 10.3 and earlier. So to handle that I add an Xcode project setting named GCC_VERSION_ppc with value of 3.3 to force the PPC version to build with GCC 3.3 and everyone’s happy.
Ran into a strange problem lately where breakpoints would not work on my G5 tower but worked just fine on my Intel laptop. Same version of Xcode, same everything else I could see. EXCEPT I finally realized that the problem was that special GCC compiler setting. Apparently Xcode 3 can’t debug code compiled with GCC 3.3.
The solution is easy: instead of adding the GCC_VERSION_ppc setting to All Configurations, add it just to the Release configuration. That way Debug builds can still use breakpoints but the final will still run on Mac OS X 10.3.
The downside is you are no longer debugging with the same version of the compiler as the release uses but since bugs are never caused by the compiler that shouldn’t be an issue, right? (NOTE: This is what’s sometimes called sarcasm.)