[fpc-pascal]compiler bug?

Florian Klaempfl Florian.Klaempfl at gmx.de
Sun Jan 5 19:25:52 CET 2003


Mark Emerson wrote:
> The following program compiles but crashes with an integer range error
> when it gets to the comparison:
> 
> {$R+}
> var
>   a : cardinal;
>   b : longint;
> begin
>   a := 0;
>   b := -1;
>   if a > b then writeln ('OK');
> end.
> 
> Am I missing something, or is this a compiler bug?

Compile with warnings on, i.e. -vw .






More information about the fpc-pascal mailing list