You are here

gcc

Ivan Radovanovic's picture

How to find out which preprocessor symbols are defined for C/C++ compiler

Run compiler with arguments -dM -E -xc++ /dev/null. (-x specifies language, so if you want to see predefined symbols for C, you should use -xc instead of -xc++).

For example:
clang -dM -E -xc++ /dev/null

or
gcc -dM -E -xc++ /dev/null

Subscribe to RSS - gcc