Browse Source

* 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 years ago
parent
commit
051b9840a5
1 changed files with 11 additions and 2 deletions
  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 }