Browse Source

* fixed web bug #2136

Jonas Maebe 23 years ago
parent
commit
9577abf606
1 changed files with 7 additions and 2 deletions
  1. 7 2
      compiler/nadd.pas

+ 7 - 2
compiler/nadd.pas

@@ -621,7 +621,9 @@ implementation
          { but an int/int gives real/real! }
          { but an int/int gives real/real! }
          if nodetype=slashn then
          if nodetype=slashn then
           begin
           begin
-            CGMessage(type_h_use_div_for_int);
+            if (left.resulttype.def.deftype <> floatdef) and
+               (right.resulttype.def.deftype <> floatdef) then
+              CGMessage(type_h_use_div_for_int);
             inserttypeconv(right,pbestrealtype^);
             inserttypeconv(right,pbestrealtype^);
             inserttypeconv(left,pbestrealtype^);
             inserttypeconv(left,pbestrealtype^);
           end
           end
@@ -1826,7 +1828,10 @@ begin
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.67  2002-10-05 00:47:03  peter
+  Revision 1.68  2002-10-08 16:50:43  jonas
+    * fixed web bug 2136
+
+  Revision 1.67  2002/10/05 00:47:03  peter
     * support dynamicarray<>nil
     * support dynamicarray<>nil
 
 
   Revision 1.66  2002/10/04 21:19:28  jonas
   Revision 1.66  2002/10/04 21:19:28  jonas