Display a list of all predefined macros in GCC

Something I always forget and have to look up.

Print predefined macros

$ gcc -dM -E - /null | sort | less

Include macros introduced by a specific header

$ echo "#include <whatever.h>" > foo.h gcc -dM -E foo.h | sort | less

The reference for -dM is in the cpp man page.