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 00:29 -------
I think you may have misunderstood the complaint: 16.3.3, p3 says that "If the
result [of operator ##] is not a valid preprocessing token, the behavior is
undefined." gcc chooses to give an error in the case #1 where the result of
concatenating 1+ and 1 is not a valid pp-token, but it fails to do so in the
case #2, where the result of concatenting s.a and b is also not a valid
pp-token. In both cases, the result is a sequence of three valid tokens, but
that's apparently not relevant. My complaint is about the inconsistency in how
gcc treats these two cases of undefined behavior.

Thanks
Martin


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