[cfe-commits] [patch] Unicode character literals for UTF-8 source encoding

Eli Friedman eli.friedman at gmail.com
Tue Jan 10 12:59:48 PST 2012


On Tue, Jan 10, 2012 at 4:05 AM, Seth Cantrell <seth.cantrell at gmail.com> wrote:
> whoops, that should be "anything that indicates '\U0010FFFD' isn't perfectly valid"
>
> Accepting larger Unicode escapes is not new with this patch (I tried the clang installed with Xcode 4.2, Apple clang version 3.0 (tags/Apple/clang-211.12) (based on LLVM 3.0svn), and `int i = '\U001F306';` gives i the value 0x001F306. Although I don't have a use-case or anything my preference is to allow the larger unicode escapes.
>
> If you want them excluded just let me know the ranges.

Accepting it and doing something different from gcc seems likely to
cause issues if someone is accidentally depending on gcc's behavior.
I think we should either reject it or do the same thing as gcc.

-Eli




More information about the cfe-commits mailing list