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

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

Reply via email to