[Bug preprocessor/12607] preprocessor fails to diagnose an undefined ## result
sebor at roguewave dot com
gcc-bugzilla@gcc.gnu.org
Tue Oct 14 01:00:00 GMT 2003
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12607
------- Additional Comments From sebor at roguewave dot com 2003-10-14 01:00 -------
I see. I think I agree with you: it's the pp-token immediatley preceding the ##
operator that, after concatenation, must form another valid token, and it is not
required that the pp-token (or sequence thereof) substituted for the macro
parameter form a single valid token after concatentation. Looks like HP
misinterpreted this the same way I did -- their preprocessor complains (see below).
I would still appreciate if the request to turn this into a warning and only
with -Wall were considered :)
Thanks
Martin
Warning (anachronism) 823: "t.cpp", line 6 # Redundant preprocessing
concatenation operation results in two valid preprocessing tokens. Depending on
this implementation defined behavior will result in non-portable code.
/* 6 */ int j = CAT (s.a, b); // #2
^
int j = s.ab ;
More information about the Gcc-bugs
mailing list