------- 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" <[EMAIL PROTECTED]> 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