http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49952
Summary: Unicode literals do not generate errors as prescribed by the FDIS standard Product: gcc Version: 4.6.1 Status: UNCONFIRMED Severity: trivial Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: z...@sogetthis.com Host: Linux x86 Referring to the standard: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2442.htm The character literal \UNNNNNNNN must only accept characters in the range 0-0x10FFFF, excluding surrogates. However, GCC allows 31-bit values above 0x10FFFF. To wit, the following compiles: char32_t s[] = U"\U0010FFFF\U7FFFFFFF"; It may be that the actual wording of the FDIS (2.3.2, p.19) is more relaxed than in the reference I gave above and that this behaviour is in fact intentional, but I thought I bring it up anyway.