cc65: Missing diagnostics: "invalid constant"
Consider this code:
int x = 0xe+1;
Expected diagnostics:
invalid constant
Actual diagnostics:
<nothing>
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 18 (11 by maintainers)
Well, I just fixed this by the way when I was working on a preprocessor fix. Before fix:
After fix:
C11, 5.1.1.2 Translation phases, 7:
C11, 6.4 Lexical elements, Syntax, 1:
C11, 6.4.8 Preprocessing numbers, Syntax, 1:
The
0xe+1is a pp-number, which is an instance of preprocessing-token. Hence, the preprocessing token0xe+1is required to be converted into a token0xe+1, which is an invalid token (invalid constant). A conforming implementation shall produce at least one diagnostic message.