This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Change in preprocessor behavior
- From: Neil Booth <neil at daikokuya dot co dot uk>
- To: Stephen Lindholm <lindholm at CS dot Stanford dot EDU>
- Cc: gcc at gcc dot gnu dot org
- Date: Mon, 30 Dec 2002 22:51:10 +0000
- Subject: Re: Change in preprocessor behavior
- References: <Pine.GSO.4.21.0212301419040.17036-100000@Xenon.Stanford.EDU>
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.