summaryrefslogtreecommitdiff
path: root/gcc/genpeep.c
diff options
context:
space:
mode:
authorzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>1999-08-27 07:47:17 +0000
committerzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>1999-08-27 07:47:17 +0000
commit04b58880851b5b61b0254669fe871f18347aef0f (patch)
tree183b4e952f4b352501a6484981cbbb5af1e6004e /gcc/genpeep.c
parent9eaf12c228566b6b7ebfb931ba36cd99d2ed39f2 (diff)
downloadgcc-04b58880851b5b61b0254669fe871f18347aef0f.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@28925 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/genpeep.c')
-rw-r--r--gcc/genpeep.c26
1 files changed, 2 insertions, 24 deletions
diff --git a/gcc/genpeep.c b/gcc/genpeep.c
index 7b02160d7a8..9b6c4920e77 100644
--- a/gcc/genpeep.c
+++ b/gcc/genpeep.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;
@@ -46,9 +47,6 @@ struct link
int vecelt;
};
-void fatal PVPROTO ((const char *, ...))
- ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
-
static int max_opno;
/* Number of operands used in current peephole definition. */
@@ -409,27 +407,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, "genpeep: ");
- vfprintf (stderr, format, ap);
- va_end (ap);
- fprintf (stderr, "\n");
- exit (FATAL_EXIT_CODE);
-}
-
int
main (argc, argv)
int argc;
@@ -441,6 +418,7 @@ main (argc, argv)
max_opno = -1;
+ progname = "genpeep";
obstack_init (rtl_obstack);
if (argc <= 1)