]>
git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gcc.dg/c2x-constexpr-7.c
1 /* Test C23 constexpr. Invalid code, compilation tests, unsigned char. */
2 /* { dg-do compile } */
3 /* { dg-options "-std=c23 -pedantic-errors -funsigned-char" } */
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" } */
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" } */