Macros

Predefined macros
You can view all the predefined macros through command-line switches with some compilers. This works with gcc and icc:

$ touch empty.cpp $ g++ -E -dM empty.cpp | sort >gxx-macros.txt $ icc -E -dM empty.cpp | sort >icx-macros.txt $ touch empty.c   $ gcc -E -dM empty.c | sort >gcc-macros.txt $ icc -E -dM empty.c | sort >icc-macros.txt

$ diff gxx-macros.txt icx-macros.txt $ diff gxx-macros.txt gcc-macros.txt $ diff icx-macros.txt icc-macros.txt

MSVC has a list.