peter at freepascal.org
Sun Jan 5 19:36:33 CET 2003
> The following program compiles but crashes with an integer range error
> when it gets to the comparison:
> a : cardinal;
> b : longint;
> a := 0;
> b := -1;
> if a > b then writeln ('OK');
> Am I missing something, or is this a compiler bug?
This is a bug. Added it as tb0447 to the testsuite.
Workaround is to use int64(a) in the comparison
More information about the fpc-pascal