CPP macro expansion
Falk Hueffner
falk.hueffner@student.uni-tuebingen.de
Tue Nov 4 23:24:00 GMT 2003
lrtaylor@micron.com writes:
> -----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
Maybe I misunderstood the question. I thought the problem was to get
from
#define F { \
bla; \
}
F
to
{
bla;
}
whereas gcc -E produces
{ bla; }
--
Falk
More information about the Gcc-help
mailing list