This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Can I find what #defines's the pre-processor makes?
- From: Andrew Haley <aph at redhat dot com>
- To: "Dr. David Kirkby" <david dot kirkby at onetel dot net>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Thu, 26 Nov 2009 17:24:08 +0000
- Subject: Re: Can I find what #defines's the pre-processor makes?
- References: <4B0EB8B3.8050404@onetel.net>
Dr. David Kirkby wrote:
> I know if I use gcc, it will define __GNUC__, and no doubt many other things
> too. Does anyone know how to get a list of them all? Is there a command I can
> execute which will list them?
>
> I'd rather a command, than a pointer to documentation, as I want to do this on a
> gcc-like complier from Sun, which has a gcc-front end, but uses Sun's superior
> back end, to generate faster code. I want to know what that defines, but since
> it acts like gcc, anything that works on gcc should work on that too.
gcc -save-temps -Wp,-dD
Look in the .i file