[Bug c++/59873] The value of char32_t U'\u0000' and char16_t u'\u000' is 1, instead of 0.

wjl at icecavern dot net gcc-bugzilla@gcc.gnu.org
Sat Jan 18 23:19:00 GMT 2014


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59873

--- Comment #3 from Wesley J. Landaker <wjl at icecavern dot net> ---
Created attachment 31887
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31887&action=edit
A truncated version of char32_literal_test.c++

I also made another program that tests ALL possible char32_t literals and
demonstrates that U+0000 (Null) is the only one that fails on gcc (it works on
clang).

The attached program is truncated because the full program is over 17 MiB, but
the literals were just generated with a script like this (surrogates were just
cut out by hand with vim):

for i in {0..1114111}; do printf "\tU'\\\\U%08x',\n" $i; done >
char32_literal_test.c++



More information about the Gcc-bugs mailing list