Search notes:

gcc -dM

-dM prints macro definitions.
In order to use -dM , the -E option must be specified, too. Otherwise, it's apparently interpreted as -fdump-rtl-mach.

Printing predefined macros

The -dM option can be used to print the predefined macros:
echo | gcc -E -dM -x c - | sort
Github repository about-gcc, path: /options/d/M-predefined-macros

Another example

What was I thinking here?
//
//     -dM: 
//         Generate a list of ‘#define’ directives for all the macros defined
//         during the execution of the preprocessor, including predefined macros.
//
//         Must be invoked with -E because otherwise would be interpreted as
//         synonym for -fdump-rtl-mach
// 
//   gcc -E -dM M.c
//   gcc -E -dM M.c | grep    TQ84
//   gcc -E -dM M.c | grep -v TQ84
//
#define TQ84_FOO foo
#define TQ84_BAR
Github repository about-gcc, path: /options/d/M.c

See also

GCC options
Possibly predefined preprocessor macros

Index