cpp macro dump

Ever wanted to know what macros GCC/G++ are predefining for you? Here is how.

For gcc: cpp -dM -gcc -x c /dev/null
For g++: cpp -dM -gcc -x c++ /dev/null

Strangely, _GNU_SOURCE seems to always be defined for C++.

Leave a Reply