This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
Re: preprocessor/7457: failure preprocessing ## directive
- From: neil at gcc dot gnu dot org
- To: gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, gnicholls at bluephoenixsolutions dot com, nobody at gcc dot gnu dot org
- Date: 31 Jul 2002 22:20:59 -0000
- Subject: Re: preprocessor/7457: failure preprocessing ## directive
- Reply-to: neil at gcc dot gnu dot org, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, gnicholls at bluephoenixsolutions dot com, nobody at gcc dot gnu dot org, gcc-gnats at gcc dot gnu dot org
Synopsis: failure preprocessing ## directive
State-Changed-From-To: open->closed
State-Changed-By: neil
State-Changed-When: Wed Jul 31 15:20:59 2002
State-Changed-Why:
Not a bug - please understand what ## means.
It means: "take the spelling of the LHS, and the spelling
of the RHS, and concatenate the two to form a new token. If the concatenation does not form a valid token, anything goes.". You are trying to create a token
"libdrv"".so"
which is not a token (it's two tokens). However, if you just drop the !@#$%^& ##, then you're OK: two strings
concatenate to become one string by the rules of C (post
macro expansion and preprocessing).
Please read a good description of what ## does.
Yes, GCC is getting more picky. That's a good thing.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7457