Prechádzať zdrojové kódy

* write a proper error message if <int>/<int> is encountered while no
floating point support is available, resolves #32006

git-svn-id: trunk@43794 -

florian 5 rokov pred
rodič
commit
051b9840a5
1 zmenil súbory, kde vykonal 11 pridanie a 2 odobranie
  1. 11 2
      compiler/nadd.pas

+ 11 - 2
compiler/nadd.pas

@@ -1754,8 +1754,17 @@ implementation
                   left.resultdef := s64inttype;
                   right.resultdef := s64inttype;
                 end;
-            inserttypeconv(right,resultrealdef);
-            inserttypeconv(left,resultrealdef);
+            if current_settings.fputype=fpu_none then
+              begin
+                Message(parser_e_unsupported_real);
+                result:=cerrornode.create;
+                exit;
+              end
+            else
+              begin
+                inserttypeconv(right,resultrealdef);
+                inserttypeconv(left,resultrealdef);
+              end;
           end
 
          { if both are orddefs then check sub types }