How to find out cl.exe's built-in macros

Viewed 5531

Does anyone know how could I find out which are cl.exe's builtin/predefined macros? For example for gcc the following command line will list all the compiler's builtin macros

gcc -dM -E - </dev/null

EDIT: I'm interested in a way similar to gcc's that is "ask the actual compiler".

Thanks

5 Answers

I don't know in what version this was made available.

/PD print all macro definitions

Example use:

  • Create an empty file foo.cpp (e.g. echo // > foo.cpp)
  • cl /Zc:preprocessor /PD foo.cpp
Related