Open llvmbot opened 5 years ago
Interesting. Try 0x123_p+1
instead -- Clang appears to lex a + after a p only if the literal starts 0x
; that was probably done for compatibility reasons when this was a GNU extension in C++.
I'm not sure what bug you're reporting here. Clang accepts the 123_p+1 case in C++<=14 and rejects in C++17, which seems correct, as C++17 introduced the
pp-number p sign
production for pp-number.
Maybe I'm missing something, but Clang seems to accept 123_p+1
in C++17 mode. https://godbolt.org/z/Kvcl5U
I'm not sure what bug you're reporting here. Clang accepts the 123_p+1
case in C++<=14 and rejects in C++17, which seems correct, as C++17 introduced the
pp-number p sign
production for pp-number
.
Extended Description
Given the following code
This should be ill-formed just like the following taken from this Stack Overflow question https://stackoverflow.com/a/53726202/1708801
Where I note due to maximal munch
0x123_e+1
is app-token
but the same analysis should also apply to123_p+1
since the grammar forpp-token
includes both: