diff options
author | rms <rms@138bc75d-0d04-0410-961f-82ee72b054a4> | 1993-11-13 08:59:22 +0000 |
---|---|---|
committer | rms <rms@138bc75d-0d04-0410-961f-82ee72b054a4> | 1993-11-13 08:59:22 +0000 |
commit | f7fa25c5e41b1a30a00e31a6ff2c230cc79c3aa4 (patch) | |
tree | cbf7e004e8678ad50a6c7d08865944e1e1bdd66c /gcc/bi-opcode.c | |
parent | 2f3caf573be51015e5f5fc0c63bbe6a29aa19c1a (diff) | |
download | gcc-f7fa25c5e41b1a30a00e31a6ff2c230cc79c3aa4.tar.gz |
Use FATAL_EXIT_CODE rather than hardcoded 1 for fatal error.
(main): Flush stdout and and check for errors prior to termination;
end with call to exit rather than return from main, as with gen*.c.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@6078 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/bi-opcode.c')
-rw-r--r-- | gcc/bi-opcode.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/bi-opcode.c b/gcc/bi-opcode.c index 74514d4a745..33208455323 100644 --- a/gcc/bi-opcode.c +++ b/gcc/bi-opcode.c @@ -50,6 +50,9 @@ enum bytecode_opcode\n{"); else fprintf (stderr, "(Number of opcodes is %d)\n", i); + fflush (stdout); + exit (ferror (stdout) != 0 ? FATAL_EXIT_CODE : SUCCESS_EXIT_CODE); + /* NOTREACHED */ return 0; } @@ -64,7 +67,7 @@ xmalloc (nbytes) if (!tmp) { fprintf (stderr, "can't allocate %d bytes (out of virtual memory)\n", nbytes); - exit (1); + exit (FATAL_EXIT_CODE); } return tmp; |