What are the predefined macros for GCC?

Q: Is there any way to get a list of GCC's predefined macros?

A: Enter this command line in your prefered terminal application to generate a list of GCC's predefined macros:

gcc -arch ppc -dM -E - < /dev/null | sort

Note: Other GCC command line options may effect the list of predefined macros. For example changing the architecture (-arch) from ppc to i386 will generate a different list of macros. Please refer to man gcc for a full explanation of the command line options.

Document Revision History

DateNotes
2005-07-06Shows how to display a list of GCC predefined macros.

Posted: 2005-07-06


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.