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

sebor at roguewave dot com gcc-bugzilla@gcc.gnu.org
Tue Oct 14 00:29: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 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



More information about the Gcc-bugs mailing list