CPP macro expansion

lrtaylor@micron.com lrtaylor@micron.com
Tue Nov 4 23:21:00 GMT 2003


-----Original Message-----
From: gcc-help-owner@gcc.gnu.org [mailto:gcc-help-owner@gcc.gnu.org] On 

> > I need to obtain a preprocessed C source output, the source
> > code that will go to the gcc compiler proper, with all the macro
> > functions expanded as declared with its multi line
> > formatting/indentation
> > and not as usual single long line. I need to check my final code
before
> > the full compilation.
> > 
> > Does anyone know how can I do ?
> > Does the GNU CPP permit this ?

> No.

Not so.  Pass the -E option to gcc (or g++).  This will cause it to
output the preprocessed source code:

gcc -E file.c

Cheers,
Lyle



More information about the Gcc-help mailing list