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