Browse Source

* avoid range check error for compile time val evaluation

florian 2 days ago
parent
commit
60ae7aeeb5
1 changed files with 3 additions and 2 deletions
  1. 3 2
      compiler/ncal.pas

+ 3 - 2
compiler/ncal.pas

@@ -2971,7 +2971,8 @@ implementation
                         ((copy(name,1,13)='$fpc_val_sint') or (copy(name,1,13)='$fpc_val_uint')) then
                         begin
                           ValOutput.signed := is_signed(ResultDef);
-
+{$PUSH}
+{$R-}
                           case Longint(tordconstnode(GetParaFromIndex(2).paravalue).value.svalue) of
                             1:
                               if ValOutput.signed then
@@ -3020,7 +3021,7 @@ implementation
                             else
                               Internalerror(2024011402);
                           end;
-
+{$POP}
                           { Due to the way the node tree works, we have to insert
                             the assignment to the Code output within the
                             assignment to the value output (function result),