mirror of https://github.com/cc65/cc65.git
Fixed cc65 exitcode when there are only preprocessor errors.
This commit is contained in:
parent
cd7c688dff
commit
b876a6b213
|
@ -1089,7 +1089,7 @@ int main (int argc, char* argv[])
|
|||
Compile (InputFile);
|
||||
|
||||
/* Create the output file if we didn't had any errors */
|
||||
if (PreprocessOnly == 0 && (ErrorCount == 0 || Debug)) {
|
||||
if (PreprocessOnly == 0 && (GetTotalErrors () == 0 || Debug)) {
|
||||
|
||||
/* Emit literals, do cleanup and optimizations */
|
||||
FinishCompile ();
|
||||
|
@ -1115,5 +1115,5 @@ int main (int argc, char* argv[])
|
|||
DoneSegAddrSizes ();
|
||||
|
||||
/* Return an apropriate exit code */
|
||||
return (ErrorCount > 0)? EXIT_FAILURE : EXIT_SUCCESS;
|
||||
return (GetTotalErrors () > 0)? EXIT_FAILURE : EXIT_SUCCESS;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
/* Bug #2312 */
|
||||
|
||||
#error "Compiler should exit with failure"
|
||||
|
||||
int main(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue