To print all defined preprocessor symbols use the command:
$ echo "" | gcc -E -dM -
or for C++:
$ echo "" | g++ -E -dM -x c++ -
This will display all defined preprocessor symbols and their values.
There is also a list of predefined macros, grouped by operating systems: