>>   v:=v+-5;
>
> I'm sorry, v IS unsigned, delta IS signed, and the computation has to be
> done. Besides, v and d are 8-bit or 16-bit, and the result WILL fit in v
> (that is checked before for other reasons).

Range check errors are inserted only at assignment. Within the expression
at the right side the value can be bigger/smaller than what is allowed.
The compiler even doesn't know the type of the final destination at that
time. And in pascal the rule is to do the calculations in the native
integer type. That means 32 bit (or 64 bit for amd64).




_______________________________________________
fpc-devel maillist  -  [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to