This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug preprocessor/12607] preprocessor fails to diagnose an undefined ## result


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 ;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]