This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Can I find what #defines's the pre-processor makes?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]