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
1 changed files with 2 additions and 7 deletions

View File

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