summaryrefslogtreecommitdiff
path: root/gcc/bi-opname.c
diff options
context:
space:
mode:
authorrms <rms@138bc75d-0d04-0410-961f-82ee72b054a4>1993-11-13 08:59:22 +0000
committerrms <rms@138bc75d-0d04-0410-961f-82ee72b054a4>1993-11-13 08:59:22 +0000
commitf7fa25c5e41b1a30a00e31a6ff2c230cc79c3aa4 (patch)
treecbf7e004e8678ad50a6c7d08865944e1e1bdd66c /gcc/bi-opname.c
parent2f3caf573be51015e5f5fc0c63bbe6a29aa19c1a (diff)
downloadgcc-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-opname.c')
-rw-r--r--gcc/bi-opname.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/bi-opname.c b/gcc/bi-opname.c
index 9eda2be602a..02dfabcfd8b 100644
--- a/gcc/bi-opname.c
+++ b/gcc/bi-opname.c
@@ -33,6 +33,10 @@ main()
for (d = defs; d; d = d->next)
for (v = d->variations; v; v = v->next)
printf("\"%s%s\",\n", d->basename, v->name);
+
+ fflush (stdout);
+ exit (ferror (stdout) != 0 ? FATAL_EXIT_CODE : SUCCESS_EXIT_CODE);
+ /* NOTREACHED */
return 0;
}
@@ -47,7 +51,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;