[fpc-devel] bug: Inc(v,i)/Dec(v,i)

Marcel Martin mm10 at ellipsa.net
Sun Jul 10 22:53:12 CEST 2005


Marcel Martin a écrit :
> Hans-Peter Diettrich a écrit :
>> As outlined before, the above assignment of x:=-x should
>> raise an range check error. A comparison of x=-x will return False, in
>> the Int64 range.
> 
> 
> Not with FPC. (Moreover, I didn't make comparisons, I only
> used ":=" and "-".)

But, if X is a Longint equal to -2^31, with {$Q+}, the
instruction "x := -x;" should raise an overflow and it
would seem it doesn't (I just checked it with FPC v2.0).
This, this is a bug.

mm




More information about the fpc-devel mailing list