This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Preprocessed output in gcc 4.5.2
- From: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: Edward Diener <eldlistmailingz at tropicsoft dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Tue, 29 Mar 2011 21:18:24 +0100
- Subject: Re: Preprocessed output in gcc 4.5.2
- References: <imteb3$76r$1@dough.gmane.org>
On 29 March 2011 21:10, Edward Diener wrote:
> According the the docs an "-E" parameter should produce preprocessed output.
It does.
> I add that to the beginning of the g++ or gcc command line but the progam
> does not produce the output and insists on compiling. What do I have to do
> to get just preprocessed output in gcc ?
Are you still giving -c on the command line too? Use -E instead of
that, not in addition to it, otherwise if -c comes later it will
override the earlier -E option (which I am guessing is what's
happening if you're putting -E at the beginning.)
Also be aware the preprocessed output will go into the file specified
by -o, so you might want to change "-c -o foo.o" to "-E -o foo.ii"