From 90c291808acf9a07fcfad79e5f4c8fd2fe692704 Mon Sep 17 00:00:00 2001 From: Stephen Heumann Date: Sat, 24 Dec 2016 00:51:01 -0600 Subject: [PATCH] Always report a non-zero error level when there is an error. This is necessary to make the "compile" command halt and not process additional source files, as well as to make occ stop and not run the linker. Previously, this was not happening when the #error directive was used, or when an undefined label was used in a goto. This addressed the issue with the compco07.c test case. --- CC.pas | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CC.pas b/CC.pas index a0fab8d..919ba90 100644 --- a/CC.pas +++ b/CC.pas @@ -165,8 +165,11 @@ if numErrors = 0 then begin {set up the return parameters} liDCBGS.sFile := @outFileGS; end; {if} end {if} -else +else begin liDCBGS.lops := 0; + if liDCBGS.merrf = 0 then + liDCBGS.merrf := 16; + end; {else} MMQuit; {dispose of our memory pools} with liDCBGS do begin {return to the shell} sFile := pointer(ord4(sFile)+2);