This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Change in preprocessor behavior


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]