This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug preprocessor/12607] preprocessor fails to diagnose an undefined ## result
- From: "sebor at roguewave dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 14 Oct 2003 00:29:13 -0000
- Subject: [Bug preprocessor/12607] preprocessor fails to diagnose an undefined ## result
- References: <20031013234821.12607.sebor@roguewave.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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