Browse Source

* moved comp<->real warning so it doesn't occure everytime that
isconvertable is called with

peter 26 years ago
parent
commit
ba1cc62a46
2 changed files with 17 additions and 9 deletions
  1. 5 8
      compiler/htypechk.pas
  2. 12 1
      compiler/tccnv.pas

+ 5 - 8
compiler/htypechk.pas

@@ -194,13 +194,6 @@ implementation
                                     doconv:=tc_real_2_fix
                                   else
                                     doconv:=tc_real_2_real;
-                                { comp isn't a floating type }
-{$ifdef i386}
-                                if (pfloatdef(def_to)^.typ=s64bit) and
-                                   (pfloatdef(def_from)^.typ<>s64bit) and
-                                   not (explicit) then
-                                  CGMessage(type_w_convert_real_2_comp);
-{$endif}
                              end;
                            b:=1;
                          end;
@@ -656,7 +649,11 @@ implementation
 end.
 {
   $Log$
-  Revision 1.17  1999-03-02 18:24:20  peter
+  Revision 1.18  1999-03-06 17:25:19  peter
+    * moved comp<->real warning so it doesn't occure everytime that
+      isconvertable is called with
+
+  Revision 1.17  1999/03/02 18:24:20  peter
     * fixed overloading of array of char
 
   Revision 1.16  1999/01/27 13:53:27  pierre

+ 12 - 1
compiler/tccnv.pas

@@ -411,6 +411,13 @@ implementation
 
     procedure first_real_to_real(var p : ptree);
       begin
+        { comp isn't a floating type }
+{$ifdef i386}
+         if (pfloatdef(p^.resulttype)^.typ=s64bit) and
+            (pfloatdef(p^.left^.resulttype)^.typ<>s64bit) and
+            not (p^.explizit) then
+           CGMessage(type_w_convert_real_2_comp);
+{$endif}
          if p^.registersfpu<1 then
            p^.registersfpu:=1;
          p^.location.loc:=LOC_FPU;
@@ -911,7 +918,11 @@ implementation
 end.
 {
   $Log$
-  Revision 1.20  1999-03-02 18:24:23  peter
+  Revision 1.21  1999-03-06 17:25:20  peter
+    * moved comp<->real warning so it doesn't occure everytime that
+      isconvertable is called with
+
+  Revision 1.20  1999/03/02 18:24:23  peter
     * fixed overloading of array of char
 
   Revision 1.19  1999/02/22 02:15:46  peter