From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2363 invoked by alias); 18 Jan 2014 23:19:07 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 2078 invoked by uid 48); 18 Jan 2014 23:19:02 -0000 From: "wjl at icecavern dot net" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/59873] The value of char32_t U'\u0000' and char16_t u'\u000' is 1, instead of 0. Date: Sat, 18 Jan 2014 23:19:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: major X-Bugzilla-Who: wjl at icecavern dot net X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: attachments.created Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-01/txt/msg02004.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59873 --- Comment #3 from Wesley J. Landaker --- 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++