[Bug preprocessor/9449] UCNs not recognized in identifiers (c++/c99)

zack at codesourcery dot com gcc-bugzilla@gcc.gnu.org
Tue Feb 22 00:10:00 GMT 2005


------- 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



More information about the Gcc-bugs mailing list