If you want to see the default preprocessor symbols for a given system on which you have GCC (for example, Mac OS X, iOS, Linux), you can get the full list from the command line, like this:
echo 'main(){}' | cpp -dM
However, they often have limited use, since at the compilation stage, on which the preprocessor works, most of the characters identify the operating system and CPU type only of the compilerโs system hosting , and not to the target system (for example, when cross-compiling for iOS). On Mac OS X and iOS, the correct way to determine the compilation time characteristics of the target system is
#include <TargetConditionals.h>
This will pick up TargetConditionals.h from the platform and SDK used, and then you can determine (for example) endianness and some other characteristics of some macros. (Browse TargetConditionals.h to find out what information you can get.)
bleater
source share