(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
c2x-constexpr-6.c
       1  /* Test C2x constexpr.  Invalid code, compilation tests, signed char.  */
       2  /* { dg-do compile } */
       3  /* { dg-options "-std=c2x -pedantic-errors -fsigned-char" } */
       4  
       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" } */
       8  
       9  void
      10  f0 ()
      11  {
      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" } */
      15  }