From 33ad038bbbf5d724394d5c07aeb4bf7aa7ad71d3 Mon Sep 17 00:00:00 2001 From: Pierre Muller Date: Mon, 6 Sep 2021 13:45:33 +0200 Subject: [PATCH] * 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. --- compiler/nadd.pas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/nadd.pas b/compiler/nadd.pas index 774ce11aa2..bdcd0d87e3 100644 --- a/compiler/nadd.pas +++ b/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;