What C preprocessor macros have already been defined in gcc?

c, c-preprocessor, gcc, macros

Solution

Predefined macros depend on the standard and the way the compiler implements it.

For GCC: http://gcc.gnu.org/onlinedocs/cpp/Predefined-Macros.html

For Microsoft Visual Studio 8: http://msdn.microsoft.com/en-us/library/b0084kay(VS.80).aspx

This Wikipedia page http://en.wikipedia.org/wiki/C_preprocessor#Compiler-specific_predefined_macros lists how to dump at some of the predefined macros

Problem

In `gcc`, how can I check what C preprocessor definitions are in place during the compilation of a C program, in particular what standard or platform-specific macro definitions are defined?

Original source