This is the mail archive of the gcc-bugs@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]

Re: A##B a preprocessing token?


Jiri Kolafa wrote:-

> In newer gcc/cpp versions, the following feature is deprecated:
> 
>    * Attempting to paste two tokens which together do not form a valid
>      preprocessing token
> 
> Why? Is there any standard that requires this?

The standard states that such behaviour is undefined.  If you have two
lexing passes, then you can often get quite different tokenization on
the second lexing, than if you have a single tokenizing pass, like GCC
now does.

The warning is to remind the user that what he wants to become one
token is still two separate tokens, and that the parser will treat it
as such.

Neil.


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