floating point division by 0.0 is well defined and occasionally used to generate +/- infinite values.

This commit is contained in:
Kelvin Sherlock 2019-03-10 16:47:18 -04:00
parent 1a2e4772cd
commit 618188c6b2

View File

@ -1199,13 +1199,8 @@ var
plusch : rop1 := rop1 + rop2; {+} plusch : rop1 := rop1 + rop2; {+}
minusch : rop1 := rop1 - rop2; {-} minusch : rop1 := rop1 - rop2; {-}
asteriskch : rop1 := rop1 * rop2; {*} asteriskch : rop1 := rop1 * rop2; {*}
slashch : begin {/} slashch : rop1 := rop1 / rop2; {/}
if rop2 = 0.0 then begin
Error(109);
rop2 := 1.0;
end; {if}
rop1 := rop1 / rop2;
end;
otherwise : Error(66); {illegal operation} otherwise : Error(66); {illegal operation}
end; {case} end; {case}
if ekind = intconst then begin if ekind = intconst then begin