| 1 |
// Test lexing of pp-numbers does not allow digit separators that do |
| 2 |
// not form part of the pp-number syntax, when the code is valid with |
| 3 |
// correct lexing but not with too many characters accepted in the |
| 4 |
// pp-number (bug 97604). |
| 5 |
// { dg-do compile { target c++14 } } |
| 6 |
|
| 7 |
static_assert (0x0'e-0xe == 0, "signs"); |
| 8 |
|
| 9 |
#define a0 '.' - |
| 10 |
#define acat(x) a ## x |
| 11 |
static_assert (acat (0'.') == 0, "."); |
| 12 |
|
| 13 |
// This case was not actually buggy. |
| 14 |
#define c0(x) 0 |
| 15 |
#define b0 c0 ( |
| 16 |
#define bcat(x) b ## x |
| 17 |
static_assert (bcat (0'\u00c0')) == 0, "identifier-nondigit"); |