Explorar o código

Removed warning for floating-point division by zero

Taddeus Kroes %!s(int64=12) %!d(string=hai) anos
pai
achega
0e0c62d5a7
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      phases/typecheck.ml

+ 1 - 1
phases/typecheck.ml

@@ -141,7 +141,7 @@ let rec typecheck node =
     (* Check for division by zero *)
     begin
       match (op, right) with
-      | (Div, Const ((IntVal 0l | FloatVal 0.0), _)) ->
+      | (Div, Const (IntVal 0l, _)) ->
         node_warning right "division by zero"
       | _ -> ()
     end;