[cfe-dev] [PATCH] C++0x unicode string and character literals now with test cases

Sean Hunt scshunt at csclub.uwaterloo.ca
Sun Jul 31 01:44:46 PDT 2011


On Sun, Jul 31, 2011 at 01:30, Eli Friedman <eli.friedman at gmail.com> wrote:

> On Sun, Jul 31, 2011 at 12:58 AM, Sean Hunt <scshunt at csclub.uwaterloo.ca>
> wrote:
> > What possibility is this? \UFFFFFFFF is far from valid, and no other
> > character escape can get anywhere near that high.
>
> L"\xFFFFFFFF" is allowed, though...
>
> -Eli
>
> Ah, yes, I'd forgotten that hex escapes can have infinite length.

One possible approach is to implement the logical extension of UTF-8 up to
32 bits. This would be a truly horrid encoding for exceptionally large
values, but would be internally consistent and allow us to handle  it if
someone decides they actually want L'\xFFFFFFFF' to be a valid wchar_t
constant.

Sean
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110731/c830dd7b/attachment.html>


More information about the cfe-dev mailing list