This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug preprocessor/9449] UCNs not recognized in identifiers (c++/c99)
- From: "zack at codesourcery dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 Feb 2005 20:54:02 -0000
- Subject: [Bug preprocessor/9449] UCNs not recognized in identifiers (c++/c99)
- References: <20030127145600.9449.rearnsha@arm.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From zack at codesourcery dot com 2005-02-21 20:54 -------
Subject: Re: UCNs not recognized in identifiers
(c++/c99)
"geoffk at geoffk dot org" <gcc-bugzilla@gcc.gnu.org> writes:
>>> The second half would a pp-number, instead. It is always true that
>>> splitting an identifier between characters yields two valid
>>> preprocessing tokens.
>>
>> Joseph has mostly explained this, but I should add that what you get
>> if you split, say, "a\u0660b", between the "a" and the backslash is
>> two identifiers, the second of which's "initial character is a
>> universal character name designating a digit", which violates a
>> shall-clause in a semantics paragraph, and therefore provokes
>> undefined behavior. (C99 6.4.2.1p3.)
>
> A shall-clause in a semantics paragraph requires a diagnostic, C99
> 5.1.1.3.
Um, no, 5.1.1.3 does not say that. It says a diagnostic is required
for a violation of any "syntax rule or constraint"; shall-clauses in
semantics paragraphs are neither. Constraints only appear in
constraints paragraphs. See 4p2 for the meaning of shall-clauses
outside constraints paragraphs.
zw
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9449