This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: CPP macro expansion
- From: Falk Hueffner <falk dot hueffner at student dot uni-tuebingen dot de>
- To: lrtaylor at micron dot com
- Cc: <robyf at tekno-soft dot it>, <gcc-help at gcc dot gnu dot org>
- Date: 05 Nov 2003 00:24:32 +0100
- Subject: Re: CPP macro expansion
- References: <363801FFD7B74240A329CEC3F7FE4CC4A2780A@ntxboimbx07.micron.com>
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