aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Stallman <rms@gnu.org>1992-09-07 06:04:38 +0000
committerRichard Stallman <rms@gnu.org>1992-09-07 06:04:38 +0000
commit3b9b4d3fa6ca154184713511dc4ac6e30731deaf (patch)
treee680c5d018a7aee3f60d9df3604fb41066a527ca /gcc
parent07d8ca2d9295b124556561d96571e6062d86d610 (diff)
downloadgcc-3b9b4d3fa6ca154184713511dc4ac6e30731deaf.zip
gcc-3b9b4d3fa6ca154184713511dc4ac6e30731deaf.tar.gz
gcc-3b9b4d3fa6ca154184713511dc4ac6e30731deaf.tar.bz2
(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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/gcc.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/gcc/gcc.c b/gcc/gcc.c
index 57b4a9d..a177900 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;
}