modula2: M2MetaError.{def,mod} and P2SymBuild.mod further cleanup
[official-gcc.git] / gcc / testsuite / gcc.dg / c23-constexpr-6.c
bloba52851feddd118cb72dce999fa0c6c4de8330752
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" } */
9 void
10 f0 ()
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" } */