Using AngelScript version 2.31.1, the following behaviors were observed regarding the "Value is too large for data type" warning:
The warning treats int8 and int16 as if they were unsigned and produces a warning iff the assigned value is respectively outside of the ranges 0-255 and 0-65535. The following snippet produces two warnings:
int8 x = -1;
int16 y = -1;
The following snippet erroneously doesn't:
int8 x = 255;
int16 y = 65535;
When a 32-bit variable overflow occurs during assigning a value to an int8 or int16 variable, the warning may be erroneously omitted. The following snippet doesn't produce a warning:
int8 x = 4294967297;
int16 y = 4294967297;
The warning is never displayed for types int32, int64, and uint64 no matter the assigned value. The following snippet doesn't produce a warning:
int x = 4294967295;
int64 y = 18446744073709551616;
uint64 z = 18446744073709551616;
uint8 x = 18446744073709551616;
uint16 y = 18446744073709551616;
uint z = 18446744073709551616;
I would be thankful if these issues could be fixed, especially the first one, where warnings are produced incorrectly. Some of our API functions have default arguments such as int8 arg = -1, which cause users' logs to be flooded with warnings whenever they make intensive use of them.