diff options
author | kenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4> | 1992-12-27 23:30:25 +0000 |
---|---|---|
committer | kenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4> | 1992-12-27 23:30:25 +0000 |
commit | 72e9fcb2bcd5d163a5d943c679e7869e6c71232d (patch) | |
tree | 33bec460a2fdcece71f7146a323f233ca7a32ebe /gcc/genoutput.c | |
parent | 6086f98945c5d131005f9d6b79de76228b8581d9 (diff) | |
download | gcc-72e9fcb2bcd5d163a5d943c679e7869e6c71232d.tar.gz |
(have_error): New variable.
(error): Set it.
(main): Test it and return FATAL_EXIT_CODE if it is set.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@2934 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/genoutput.c')
-rw-r--r-- | gcc/genoutput.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/gcc/genoutput.c b/gcc/genoutput.c index 336cd85c76e..eea252aed00 100644 --- a/gcc/genoutput.c +++ b/gcc/genoutput.c @@ -165,6 +165,11 @@ struct data *end_of_insn_data; for this machine description. */ int have_constraints; + +/* Nonzero if some error has occurred. We will make all errors fatal, but + might as well continue until we see all of them. */ + +static int have_error; static void output_prologue () @@ -919,6 +924,8 @@ error (s, a1, a2) fprintf (stderr, "genoutput: "); fprintf (stderr, s, a1, a2); fprintf (stderr, "\n"); + + have_error = 1; } int @@ -973,7 +980,9 @@ main (argc, argv) output_epilogue (); fflush (stdout); - exit (ferror (stdout) != 0 ? FATAL_EXIT_CODE : SUCCESS_EXIT_CODE); + exit (ferror (stdout) != 0 || have_error + ? FATAL_EXIT_CODE : SUCCESS_EXIT_CODE); + /* NOTREACHED */ return 0; } |