This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Change in preprocessor behavior
- From: Stephen Lindholm <lindholm at CS dot Stanford dot EDU>
- To: Neil Booth <neil at daikokuya dot co dot uk>
- Cc: gcc at gcc dot gnu dot org
- Date: Mon, 30 Dec 2002 15:46:28 -0800 (PST)
- Subject: Re: Change in preprocessor behavior
I'm using the version of gcc which came with Mac OS X, and I compared it
to the old version of gcc installed on the Solaris mail server. I did not
install either of the two compilers myself.
I did cut and paste the command line and output exactly as they were in
the terminal window.
I guess the OS X compiler came out of the box configured differently than
I expected. I know it has some modifications to support Mac programming,
but I did not expect the preprocessor to be configured differently. I
guess I will just have to use a different computer for my preprocessing or
install another version of gcc.
Thank you for your help.
On Mon, 30 Dec 2002, Neil Booth wrote:
> Stephen Lindholm wrote:-
>
> > thrush:~% cpp test2
> > # 1 "test2"
> >
> >
> > struct command commands[] =
> > {
> > { #quit, quit ## _command },
> > { #help, help ## _command },
> > };
>
> Contrary to your claim, I suspect you're using cpp -traditional, no?
>
> Traditional preprocessors did not support # and ##, and 3.1 is more
> "correct" in this respect. FWIW 3.3 has another new implementation of
> traditional preprocessing which is the most faithful of GCC's
> implementations to true traditional preprocessing.
>
> Neil.
>