[fpc-pascal] Range checks
C Western
l at c-m-w.me.uk
Sat Jan 27 16:57:28 CET 2018
On 27/01/18 15:06, Adriaan van Os wrote:
> C Western wrote:
>> The following innocuous looking code generates a range check error:
>
> The code shouldn't generate a range check error, as the target type is
> signed.
>
Note that shifting the loop variable to Int64 still triggers the range
check error. Using qword for the loop variable triggers an overflow error.
> Apple has never heard of type inclusion or even range checking and is
> arbitrarily mixing signed and unsigned types.
I don't think this is an Apple issue - an unsigned type is not
unreasonable for a count.
Colin
More information about the fpc-pascal
mailing list