arocc
arocc copied to clipboard
Validate digits of binary/octal constants
Error message for invalid binary/octal constants could be improved:
int x = 0b19;
int y = 019;
clang output:
test.c:1:12: error: invalid digit '9' in binary constant
int x = 0b19;
^
test.c:2:11: error: invalid digit '9' in octal constant
int y = 019;
^
vs arocc
./test.c:1:12: error: expected ';', found 'an integer literal'
int x = 0b19;
^
./test.c:2:11: error: expected ';', found 'an integer literal'
int y = 019;
^