diff options
author | Zack Weinberg <zack@gcc.gnu.org> | 1999-08-27 07:47:17 +0000 |
---|---|---|
committer | Zack Weinberg <zack@gcc.gnu.org> | 1999-08-27 07:47:17 +0000 |
commit | f8b6598ecc2a0594801da4f59f5740b550802244 (patch) | |
tree | 183b4e952f4b352501a6484981cbbb5af1e6004e /gcc/genopinit.c | |
parent | 2ca7bde97344e506b3cbf59837bf172a18136aca (diff) | |
download | gcc-f8b6598ecc2a0594801da4f59f5740b550802244.zip gcc-f8b6598ecc2a0594801da4f59f5740b550802244.tar.gz gcc-f8b6598ecc2a0594801da4f59f5740b550802244.tar.bz2 |
errors.c: New file...
1999-08-27 00:27 -0700 Zack Weinberg <zack@bitmover.com>
* errors.c: New file; defines functions error, warning, and
fatal, variables have_error and progname.
* errors.h: New file; prototypes and decls for stuff in errors.c.
* Makefile: Add rules to build errors.o and
$(HOST_PREFIX)errors.o. Link genconfig, gencodes, genemit,
genopinit, genrecog, genextract, genpeep, genattr, and
genoutput with errors.o. Add errors.h to deps of genconfig.o,
gencodes.o, genemit.o, genopinit.o, genrecog.o, genextract.o,
genpeep.o, genattr.o, and genoutput.o.
* genconfig.c, gencodes.c, genemit.c, genopinit.c, genrecog.c,
genextract.c, genpeep.c, genattr.c: Include errors.h. Don't
define or prototype fatal. Set progname at beginning of main.
* genoutput.c: Likewise, and don't define or prototype error
either.
From-SVN: r28925
Diffstat (limited to 'gcc/genopinit.c')
-rw-r--r-- | gcc/genopinit.c | 26 |
1 files changed, 2 insertions, 24 deletions
diff --git a/gcc/genopinit.c b/gcc/genopinit.c index ef9f3c7..a68c27b 100644 --- a/gcc/genopinit.c +++ b/gcc/genopinit.c @@ -23,6 +23,7 @@ Boston, MA 02111-1307, USA. */ #include "system.h" #include "rtl.h" #include "obstack.h" +#include "errors.h" static struct obstack obstack; struct obstack *rtl_obstack = &obstack; @@ -30,9 +31,6 @@ struct obstack *rtl_obstack = &obstack; #define obstack_chunk_alloc xmalloc #define obstack_chunk_free free -void fatal PVPROTO ((const char *, ...)) - ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN; - /* Many parts of GCC use arrays that are indexed by machine mode and contain the insn codes for pattern in the MD file that perform a given operation on operands of that mode. @@ -306,27 +304,6 @@ xrealloc (old, size) return ptr; } -void -fatal VPROTO ((const char *format, ...)) -{ -#ifndef ANSI_PROTOTYPES - const char *format; -#endif - va_list ap; - - VA_START (ap, format); - -#ifndef ANSI_PROTOTYPES - format = va_arg (ap, const char *); -#endif - - fprintf (stderr, "genopinit: "); - vfprintf (stderr, format, ap); - va_end (ap); - fprintf (stderr, "\n"); - exit (FATAL_EXIT_CODE); -} - int main (argc, argv) int argc; @@ -336,6 +313,7 @@ main (argc, argv) FILE *infile; register int c; + progname = "genopinit"; obstack_init (rtl_obstack); if (argc <= 1) |