I expect it would break some other parse but this is not immediately springing to mind…
E.g. If I say this:
#include <stdio.h>
int main()
{
int i = 10 000;
printf("%d\n", i);
return 0;
}
My compiler says this:
ctest.c:5: error: expected ‘,’ or ‘;’ before numeric constant
I’m thinking that it would be a feature, i.e. it’s easier to ‘eye parse’ large integers with thousands separators.
I’m using a recent GCC and assuming this is the case for other compilers/parsers/lexers; whichever it is that objects.
The language doesn’t allow this (an integer literal is one token, the intervening whitespace splits it into two tokens) but there’s typically little to no expense incurred by expressing the initializer as an expression that is a calculation of literals: