This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/10212: Preprocessor ## problem
- From: zack at gcc dot gnu dot org
- To: gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org, rwgk at cci dot lbl dot gov
- Date: 25 Mar 2003 18:32:08 -0000
- Subject: Re: c++/10212: Preprocessor ## problem
- Reply-to: zack at gcc dot gnu dot org, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org, rwgk at cci dot lbl dot gov, gcc-gnats at gcc dot gnu dot org
Synopsis: Preprocessor ## problem
State-Changed-From-To: open->closed
State-Changed-By: zack
State-Changed-When: Tue Mar 25 18:32:08 2003
State-Changed-Why:
Not a bug. C++98 [cpp.concat]/3:
If the result [of pasting two tokens together] is not
a valid preprocessing token, the behavior is undefined.
GCC chooses to issue a hard error.
The ## in the macro in your example is totally unnecessary. Remove it and your program will work correctly both with GCC 3.3 and with all other compilers.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10212