Debian Codegraph @

gcc/testsuite/c-c++-common/cpp/delimited-escape-seq-5.c

raw
1 /* P2290R3 - Delimited escape sequences */
2 /* { dg-do compile } */
3 /* { dg-require-effective-target wchar } */
4 /* { dg-options "-std=c17 -Wno-c++-compat" { target c } } */
5 /* { dg-options "-std=c++23" { target c++ } } */
6
7 #define z(x) 0
8 #define a z(
9 int b = a\u{}); /* { dg-warning "empty delimited escape sequence; treating it as separate tokens" "" { target c++23 } } */
10 int c = a\u{); /* { dg-warning "'\\\\u\\\{' not terminated with '\\\}' after \\\\u\\\{; treating it as separate tokens" "" { target c++23 } } */
11 int d = a\u{12XYZ}); /* { dg-warning "'\\\\u\\\{' not terminated with '\\\}' after \\\\u\\\{12; treating it as separate tokens" "" { target c++23 } } */
12 int e = a\u123);
13 int f = a\U1234567);