This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: A##B a preprocessing token?
- To: Jiri Kolafa <jiri at icpf dot cas dot cz>
- Subject: Re: A##B a preprocessing token?
- From: Neil Booth <neil at daikokuya dot demon dot co dot uk>
- Date: Tue, 6 Nov 2001 19:08:26 +0000
- Cc: gcc-bugs at gcc dot gnu dot org
- References: <Pine.OSF.4.10.10111061539040.23366-100000@omega>
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.