From: Richard Stallman Date: Mon, 7 Sep 1992 06:04:38 +0000 (+0000) Subject: (main): No program should return the error_count! X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3b9b4d3fa6ca154184713511dc4ac6e30731deaf;p=gcc.git (main): No program should return the error_count! Return 2 if failure due to signal, 1 if just errors. (execute): Increment signal_count. From-SVN: r2068 --- diff --git a/gcc/gcc.c b/gcc/gcc.c index 57b4a9d0dd7..a177900bd14 100644 --- a/gcc/gcc.c +++ b/gcc/gcc.c @@ -826,6 +826,10 @@ static int argbuf_index; static int execution_count; +/* Number of commands that exited with a signal. */ + +static int signal_count; + /* Name with which this program was invoked. */ static char *programname; @@ -1726,8 +1730,11 @@ execute () prog = commands[j].prog; if ((status & 0x7F) != 0) - fatal ("Internal compiler error: program %s got fatal signal %d", - prog, (status & 0x7F)); + { + fatal ("Internal compiler error: program %s got fatal signal %d", + prog, (status & 0x7F)); + signal_count++; + } if (((status & 0xFF00) >> 8) >= MIN_FATAL_STATUS) ret_code = -1; } @@ -3474,7 +3481,7 @@ main (argc, argv) delete_failure_queue (); delete_temp_files (); - exit (error_count); + exit (error_count > 0 ? (signal_count ? 2 : 1) : 0); /* NOTREACHED */ return 0; }