diff options
author | ghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-05-11 06:50:51 +0000 |
---|---|---|
committer | ghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-05-11 06:50:51 +0000 |
commit | f74abef12b1b15a349b696b7c99aced722ef21b4 (patch) | |
tree | e39c8153de84f083498305d70db90b91deed0973 /gcc/genextract.c | |
parent | d8bbef5c0154532ba0d2880a6e0398e02a0e831c (diff) | |
download | gcc-f74abef12b1b15a349b696b7c99aced722ef21b4.tar.gz |
* genattr.c: Include stdarg.h/varargs.h. Change function
`fatal' to use variable arguments instead of faking it with
integer parameters. Provide a prototype which also
checks the format specifiers using ATTRIBUTE_PRINTF_1.
* genattrtab.c: Likewise.
* gencodes.c: Likewise.
* genconfig.c: Likewise.
* genemit.c: Likewise.
* genextract.c: Likewise.
* genflags.c: Likewise.
* genopinit.c: Likewise.
* genpeep.c: Likewise.
* genrecog.c: Likewise.
* genoutput.c: Likewise. Similarly for function `error'.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@19661 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/genextract.c')
-rw-r--r-- | gcc/genextract.c | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/gcc/genextract.c b/gcc/genextract.c index 574a8f38b9c..288b32bcbaf 100644 --- a/gcc/genextract.c +++ b/gcc/genextract.c @@ -20,6 +20,11 @@ Boston, MA 02111-1307, USA. */ #include "hconfig.h" +#ifdef __STDC__ +#include <stdarg.h> +#else +#include <varargs.h> +#endif #include "system.h" #include "rtl.h" #include "obstack.h" @@ -100,7 +105,7 @@ static void walk_rtx PROTO ((rtx, char *)); static void print_path PROTO ((char *)); char *xmalloc PROTO ((unsigned)); char *xrealloc PROTO ((char *, unsigned)); -static void fatal (); +static void fatal PVPROTO ((char *, ...)) ATTRIBUTE_PRINTF_1; static char *copystr PROTO ((char *)); static void mybzero (); void fancy_abort PROTO ((void)); @@ -362,11 +367,22 @@ xrealloc (ptr, size) } static void -fatal (s, a1, a2) - char *s; +fatal VPROTO ((char *format, ...)) { +#ifndef __STDC__ + char *format; +#endif + va_list ap; + + VA_START (ap, format); + +#ifndef __STDC__ + format = va_arg (ap, char *); +#endif + fprintf (stderr, "genextract: "); - fprintf (stderr, s, a1, a2); + vfprintf (stderr, format, ap); + va_end (ap); fprintf (stderr, "\n"); exit (FATAL_EXIT_CODE); } |