Out of range number literals (at least inegers, not sure about floats) will truncate to -1.
Note that I'm talking about numbers bigger than 0xffffffffffffffff. This will parse to -1 (which is correct). And adding more fs should not change the value. In this case it does not because if the value is out of range it will return ULONG_MAX which is also -1 after the cast. But e.g. 0xffffffffffffff0c is -244 (which is correct) but adding more fs will change the value to -1 instead of keeping it -244.
I think none of the C/C++ parsing functions do what we want here and we have to implement it ourselves.
Out of range number literals (at least inegers, not sure about floats) will truncate to
-1.Note that I'm talking about numbers bigger than
0xffffffffffffffff. This will parse to-1(which is correct). And adding morefs should not change the value. In this case it does not because if the value is out of range it will return ULONG_MAX which is also -1 after the cast. But e.g.0xffffffffffffff0cis-244(which is correct) but adding morefs will change the value to-1instead of keeping it-244.I think none of the C/C++ parsing functions do what we want here and we have to implement it ourselves.