The function pcharp_to_svalue_inumber(), used by the compiler to parse
integer literals, clamps literals to [MIN_INT_TYPE..MAX_INT_TYPE] when
AUTO_BIGNUM is not defined, i.e. a literal such as e.g. 12345678912345
will typically become the literal 2147483647. Is this intentional?
The testsuite does not like it:
test_any([[int a=0xffffffff; return a+17]], 0x100000010);
test_any([[int a=0xffffffff; return a-17]], 0xffffffee);
test_any([[int a=0xffffffff; return a*17]], 0x10ffffffef);
[...]
test_any([[int a=0xffffffff; return a<<17]], 0x1fffffffe0000);
test_any([[ int a=0xffffffff; return a/17 ]],
[[ (0xffffffff == -1)?-1:0x0f0f0f0f ]]);
test_any([[ int a=0xffffffff; return a%17 ]],
[[ (0xffffffff == -1)?16:0 ]]);
test_any([[ int a=0xffffffff; return a>>17 ]],
[[ (0xffffffff == -1)?-1:0x7fff ]]);
All these fail due to the clamping. In order to perform the intended
tests, all the literals greater than 17 have to be written as
0xffff|(0xffff<<16), 0x10000001<<4, etc. The question is, should this
clamping be performed in the first place?