cpplib: Preliminary implementation of UCNs

Martin v. Löwis martin@v.loewis.de
Sun Apr 20 22:32:00 GMT 2003

> It handles UCNs in identifiers, with the valid UCNs of C++98 and C99
> depending on the language (with the typo fix for C++98).  Inputting the
> C99 stuff was awfully dull.  The ranges are quite disjoint for C++ and
> C; IMO that's dumb and sometime in the future it's better to accept the
> same thing whatever it is (it appears Comeau does this, accepting the
> union of the two).

I came to the conclusion that it would be best to accept just the C
list in C++, unless strict ISO conformance is requested.

Doing so is more correct from a Unicode point of view, and also takes
away the need for normalization that some people want to see.

>  This is because it's easy for -E output, and I'm not sure what we
> want to do as far as mangling is concerned, and I don't think it's a
> good idea to make \u00aa and \u00AA the same identifier, never mind
> making it the same as the character itself.

That sounds incorrect. \u00aa and \u00AA *are* the same identifier.
When you do

#define \u00aa 1
#ifndef \u00AA
#error FAILED

you should not get a failure.


More information about the Gcc-patches mailing list