You are here


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

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

Ivan Radovanovic's picture

Discovering include paths for clang++

It can be done using command
clang++ -v -xc++ -

Subscribe to RSS - clang