Predefined macros

So with the GNU compiler you can use the preprocessor to get a list of the predefined macros:

$ cpp -dM /dev/null

or if you prefer to invoke the preprocessor via gcc itself:

$ gcc -dM -E - < /dev/null

This should give you a list similar like:

#define __DBL_MIN_EXP__ (-1021)
#define __FLT_MIN__ 1.17549435e-38F
#define __DEC64_DEN__ 0.000000000000001E-383DD
#define __CHAR_BIT__ 8
#define __WCHAR_MAX__ 2147483647

For Microsoft's Visual C++ compiler I have only found pages like:

For Intel's C++ compiler I found the following page with predefined macros.

And I find this interesting page with a lot of different compilers and their predefined macros to identify them and their versions, if any.

Edit: I also found how to do this with Clang:

$ clang -dD -E - < /dev/null