1 /* Test C2x constexpr. Invalid code, compilation tests, unsigned char. */
2 /* { dg-do compile } */
3 /* { dg-options "-std=c2x -pedantic-errors -funsigned-char" } */
4
5 constexpr signed char v2[] = "\x00\xff"; /* { dg-error "'constexpr' initializer not representable in type of object" } */
6 constexpr signed char v5[] = u8"\x00\xff"; /* { dg-error "'constexpr' initializer not representable in type of object" } */
7
8 void
9 f0 ()
10 {
11 (constexpr signed char []) { "\x00\xff" }; /* { dg-error "'constexpr' initializer not representable in type of object" } */
12 (constexpr signed char []) { u8"\x00\xff" }; /* { dg-error "'constexpr' initializer not representable in type of object" } */
13 }