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.
This commit is contained in:
Stephen Heumann 2016-12-24 00:51:01 -06:00
parent 280f67e846
commit 90c291808a
1 changed files with 4 additions and 1 deletions

5
CC.pas
View File

@ -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);