c++/10212: Preprocessor ## problem

zack@gcc.gnu.org zack@gcc.gnu.org
Tue Mar 25 19:41:00 GMT 2003


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



More information about the Gcc-bugs mailing list