GCC and Oracle Developer Studio compilers predefine different symbols.
To see the symbols gcc predefines for C and C++:
$ gcc -E -dM -xc /dev/null $ g++ -E -dM -xc++ /dev/null
To see the symbols that Oracle Developer Studio C and C++ compilers predefine:
$ cc -xdumpmacros -E /dev/null $ CC -xdumpmacros -E /dev/null
Use of various compiler options can affect the predefined macros and their values for all compilers. The –m32|–m64 options and the language options (std=v) in particular affect predefined macros.
This output also includes source code defining the _GNU_SOURCE macro, which is used to enable header file declarations for various non-portable functions, defined mostly in glibc. More information is available at http://stackoverflow.com/questions/5582211/what-does-define-gnu-sourceimply.