From aabbadb34b46e8a90d6bc37ebc59503a28652a39 Mon Sep 17 00:00:00 2001 From: Stephen Heumann Date: Sat, 19 Feb 2022 14:06:15 -0600 Subject: [PATCH] Terminate header generation if #warning is encountered. This is necessary to ensure that the warning message is printed on subsequent compiles. --- Scanner.pas | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Scanner.pas b/Scanner.pas index 0fb6029..29fbedb 100644 --- a/Scanner.pas +++ b/Scanner.pas @@ -2727,7 +2727,9 @@ var begin {DoError} lFirstPtr := firstPtr; if isError then - numErrors := numErrors+1; + numErrors := numErrors+1 + else + TermHeader; new(msg); if isError then msg^ := '#error:'