1 /* Test C23 constexpr. Invalid code, compilation tests, signed char. */
2 /* { dg-do compile } */
3 /* { dg-options "-std=c23 -pedantic-errors -fsigned-char" } */
5 constexpr unsigned char v3
[] = "\x00\xff"; /* { dg-error "'constexpr' initializer not representable in type of object" } */
6 constexpr char v4
[] = u8
"\x00\xff"; /* { dg-error "'constexpr' initializer not representable in type of object" } */
7 constexpr signed char v5
[] = u8
"\x00\xff"; /* { dg-error "'constexpr' initializer not representable in type of object" } */
12 (constexpr unsigned char []) { "\x00\xff" }; /* { dg-error "'constexpr' initializer not representable in type of object" } */
13 (constexpr char []) { u8
"\x00\xff" }; /* { dg-error "'constexpr' initializer not representable in type of object" } */
14 (constexpr signed char []) { u8
"\x00\xff" }; /* { dg-error "'constexpr' initializer not representable in type of object" } */