To get a list of predefined macros: touch foo.c gcc -dM -E foo.c This is described in (gcc.info)Preprocessor Options. (from Charles Karney) ============================================================= orion> gcc -dM -E foo.c #define __GCC_NEW_VARARGS__ 1 #define __sparc 1 #define __svr4__ 1 #define __GNUC_MINOR__ 7 #define __sun 1 #define sparc 1 #define __sun__ 1 #define __unix 1 #define __unix__ 1 #define __SVR4 1 #define sun 1 #define __GNUC__ 2 #define __sparc__ 1 #define unix 1 ppcc> gcc -dM -E foo.c #define __GCC_NEW_VARARGS__ 1 #define __sparc 1 #define __GNUC_MINOR__ 7 #define __sun 1 #define sparc 1 #define __sun__ 1 #define __unix 1 #define __unix__ 1 #define sun 1 #define __GNUC__ 2 #define __sparc__ 1 #define unix 1