Require target lra in gcc.dg/pr108095.c
[official-gcc.git] / gcc / testsuite / gcc.dg / c2x-utf8char-3.c
blob7c489831998924d35534befa87bc4cb356eedbb9
1 /* Test C2x UTF-8 characters. Test errors for invalid code. */
2 /* { dg-do compile } */
3 /* { dg-options "-std=c2x -pedantic-errors" } */
5 unsigned char a = u8''; /* { dg-error "empty character constant" } */
6 unsigned char b = u8'ab'; /* { dg-error "character constant too long for its type" } */
7 unsigned char c = u8'\u00ff'; /* { dg-error "character constant too long for its type" } */
8 unsigned char d = u8'\x100'; /* { dg-error "hex escape sequence out of range" } */