This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/53690] [C++11] \u0000 and \U00000000 are wrongly encoded as U+0001.
- From: "steven at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 08 Jul 2012 20:23:40 +0000
- Subject: [Bug c++/53690] [C++11] \u0000 and \U00000000 are wrongly encoded as U+0001.
- Auto-submitted: auto-generated
- References: <bug-53690-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53690
--- Comment #3 from Steven Bosscher <steven at gcc dot gnu.org> 2012-07-08 20:23:40 UTC ---
Test case:
$ cat testsuite/g++.dg/pr53690.C
// { dg-do compile }
// { dg-options "-std=c++11" }
extern "C" int printf (__const char *__restrict __format, ...);
typedef unsigned short uint16_t;
typedef unsigned int uint32_t;
int main() {
uint32_t a = U'\U00000000';
uint32_t b = U'\u0000';
uint32_t c = U'\x00';
uint32_t d = U'\0';
uint16_t e = u'\U00000000';
uint16_t f = u'\u0000';
uint16_t g = u'\x00';
uint16_t h = u'\0';
printf("%x %x %x %x %x %x %x %x\n", a, b, c, d, e, f, g, h);
return 0;
}
// { dg-final { scan-tree-dump-not "= 1" "original" } }