Browse Source

* Avoid some wrong error messages after initial error

  On x86_64-openbsd, cycling with -O3 option fails due to
a wrong warning about uninitialized zeros variable in
compilation of ogbase unit
ogbase.pas(2310,41) Warning: Local variable "zeros" does not seem to be initialized
ogbase.pas(2318,39) Error: Can't evaluate constant expression

The second message is due to the fact that simplify is not
called inside nadd unit if errorcount is non-zero.
  By replacing errorcount<>0 by not codegenerror,
this message disappears.
Pierre Muller 3 years ago
parent
commit
33ad038bbb
1 changed files with 1 additions and 1 deletions
  1. 1 1
      compiler/nadd.pas

+ 1 - 1
compiler/nadd.pas

@@ -3200,7 +3200,7 @@ implementation
             end;
           end;
 
-         if (errorcount=0) and
+         if not(codegenerror) and
             not assigned(result) then
            result:=simplify(false);
       end;