genattr.c: Include stdarg.h/varargs.h.
* 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'. From-SVN: r19661
This commit is contained in:
parent
ce4a03916c
commit
320e7c40e7
|
@ -1,3 +1,21 @@
|
|||
Mon May 11 09:33:10 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
|
||||
|
||||
* 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'.
|
||||
|
||||
Sun May 10 02:27:03 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
|
||||
|
||||
* acconfig.h (HAVE_VOLATILE): Insert stub for autoconf.
|
||||
|
|
|
@ -21,6 +21,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"
|
||||
|
@ -32,7 +37,7 @@ struct obstack *rtl_obstack = &obstack;
|
|||
#define obstack_chunk_free free
|
||||
|
||||
char *xmalloc PROTO((unsigned));
|
||||
static void fatal ();
|
||||
static void fatal PVPROTO ((char *, ...)) ATTRIBUTE_PRINTF_1;
|
||||
void fancy_abort PROTO((void));
|
||||
|
||||
/* Define this so we can link with print-rtl.o to get debug_rtx function. */
|
||||
|
@ -221,11 +226,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, "genattr: ");
|
||||
fprintf (stderr, s, a1, a2);
|
||||
vfprintf (stderr, format, ap);
|
||||
va_end (ap);
|
||||
fprintf (stderr, "\n");
|
||||
exit (FATAL_EXIT_CODE);
|
||||
}
|
||||
|
|
|
@ -96,7 +96,7 @@ Boston, MA 02111-1307, USA. */
|
|||
|
||||
|
||||
#include "hconfig.h"
|
||||
/* varargs must always be included after *config.h. */
|
||||
/* varargs must always be included after *config.h, but before stdio.h. */
|
||||
#ifdef __STDC__
|
||||
#include <stdarg.h>
|
||||
#else
|
||||
|
@ -125,7 +125,7 @@ struct obstack *temp_obstack = &obstack2;
|
|||
/* Define this so we can link with print-rtl.o to get debug_rtx function. */
|
||||
char **insn_name_ptr = 0;
|
||||
|
||||
static void fatal ();
|
||||
static void fatal PVPROTO ((char *, ...)) ATTRIBUTE_PRINTF_1;
|
||||
void fancy_abort PROTO((void));
|
||||
|
||||
/* enough space to reserve for printing out ints */
|
||||
|
@ -5769,12 +5769,22 @@ copy_rtx_unchanging (orig)
|
|||
}
|
||||
|
||||
static void
|
||||
fatal (s, a1, a2)
|
||||
char *s;
|
||||
char *a1, *a2;
|
||||
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, "genattrtab: ");
|
||||
fprintf (stderr, s, a1, a2);
|
||||
vfprintf (stderr, format, ap);
|
||||
va_end (ap);
|
||||
fprintf (stderr, "\n");
|
||||
exit (FATAL_EXIT_CODE);
|
||||
}
|
||||
|
|
|
@ -23,6 +23,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"
|
||||
|
@ -34,7 +39,7 @@ struct obstack *rtl_obstack = &obstack;
|
|||
#define obstack_chunk_free free
|
||||
|
||||
char *xmalloc PROTO((unsigned));
|
||||
static void fatal ();
|
||||
static void fatal PVPROTO ((char *, ...)) ATTRIBUTE_PRINTF_1;
|
||||
void fancy_abort PROTO((void));
|
||||
|
||||
/* Define this so we can link with print-rtl.o to get debug_rtx function. */
|
||||
|
@ -79,11 +84,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, "gencodes: ");
|
||||
fprintf (stderr, s, a1, a2);
|
||||
vfprintf (stderr, format, ap);
|
||||
va_end (ap);
|
||||
fprintf (stderr, "\n");
|
||||
exit (FATAL_EXIT_CODE);
|
||||
}
|
||||
|
|
|
@ -21,6 +21,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"
|
||||
|
@ -50,7 +55,7 @@ static int clobbers_seen_this_insn;
|
|||
static int dup_operands_seen_this_insn;
|
||||
|
||||
char *xmalloc PROTO((unsigned));
|
||||
static void fatal ();
|
||||
static void fatal PVPROTO ((char *, ...)) ATTRIBUTE_PRINTF_1;
|
||||
void fancy_abort PROTO((void));
|
||||
|
||||
static void walk_insn_part PROTO((rtx, int, int));
|
||||
|
@ -268,11 +273,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, "genconfig: ");
|
||||
fprintf (stderr, s, a1, a2);
|
||||
vfprintf (stderr, format, ap);
|
||||
va_end (ap);
|
||||
fprintf (stderr, "\n");
|
||||
exit (FATAL_EXIT_CODE);
|
||||
}
|
||||
|
|
|
@ -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"
|
||||
|
@ -31,7 +36,7 @@ struct obstack *rtl_obstack = &obstack;
|
|||
#define obstack_chunk_free free
|
||||
|
||||
char *xmalloc PROTO((unsigned));
|
||||
static void fatal ();
|
||||
static void fatal PVPROTO ((char *, ...)) ATTRIBUTE_PRINTF_1;
|
||||
void fancy_abort PROTO((void));
|
||||
|
||||
/* Define this so we can link with print-rtl.o to get debug_rtx function. */
|
||||
|
@ -702,11 +707,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, "genemit: ");
|
||||
fprintf (stderr, s, a1, a2);
|
||||
vfprintf (stderr, format, ap);
|
||||
va_end (ap);
|
||||
fprintf (stderr, "\n");
|
||||
exit (FATAL_EXIT_CODE);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -23,6 +23,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"
|
||||
|
@ -34,7 +39,7 @@ struct obstack *rtl_obstack = &obstack;
|
|||
#define obstack_chunk_free free
|
||||
|
||||
char *xmalloc PROTO((unsigned));
|
||||
static void fatal ();
|
||||
static void fatal PVPROTO ((char *, ...)) ATTRIBUTE_PRINTF_1;
|
||||
void fancy_abort PROTO((void));
|
||||
|
||||
/* Names for patterns. Need to allow linking with print-rtl. */
|
||||
|
@ -199,11 +204,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, "genflags: ");
|
||||
fprintf (stderr, s, a1, a2);
|
||||
vfprintf (stderr, format, ap);
|
||||
va_end (ap);
|
||||
fprintf (stderr, "\n");
|
||||
exit (FATAL_EXIT_CODE);
|
||||
}
|
||||
|
|
|
@ -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"
|
||||
|
@ -31,7 +36,7 @@ struct obstack *rtl_obstack = &obstack;
|
|||
#define obstack_chunk_free free
|
||||
|
||||
char *xmalloc PROTO((unsigned));
|
||||
static void fatal ();
|
||||
static void fatal PVPROTO ((char *, ...)) ATTRIBUTE_PRINTF_1;
|
||||
void fancy_abort PROTO((void));
|
||||
|
||||
/* Many parts of GCC use arrays that are indexed by machine mode and
|
||||
|
@ -304,11 +309,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, "genopinit: ");
|
||||
fprintf (stderr, s, a1, a2);
|
||||
vfprintf (stderr, format, ap);
|
||||
va_end (ap);
|
||||
fprintf (stderr, "\n");
|
||||
exit (FATAL_EXIT_CODE);
|
||||
}
|
||||
|
|
|
@ -91,6 +91,11 @@ It would not make an case in output_insn_hairy because the template
|
|||
given in the entry is a constant (it does not start with `*'). */
|
||||
|
||||
#include "hconfig.h"
|
||||
#ifdef __STDC__
|
||||
#include <stdarg.h>
|
||||
#else
|
||||
#include <varargs.h>
|
||||
#endif
|
||||
#include "system.h"
|
||||
#include "rtl.h"
|
||||
#include "obstack.h"
|
||||
|
@ -108,9 +113,9 @@ struct obstack *rtl_obstack = &obstack;
|
|||
#define obstack_chunk_free free
|
||||
|
||||
char *xmalloc PROTO((unsigned));
|
||||
static void fatal ();
|
||||
static void fatal PVPROTO ((char *, ...)) ATTRIBUTE_PRINTF_1;
|
||||
void fancy_abort PROTO((void));
|
||||
static void error ();
|
||||
static void error PVPROTO ((char *, ...)) ATTRIBUTE_PRINTF_1;
|
||||
static void mybcopy ();
|
||||
static void mybzero ();
|
||||
static int n_occurrences PROTO((int, char *));
|
||||
|
@ -922,11 +927,22 @@ mybcopy (b1, b2, length)
|
|||
}
|
||||
|
||||
static void
|
||||
fatal (s, a1, a2, a3, a4)
|
||||
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, "genoutput: ");
|
||||
fprintf (stderr, s, a1, a2, a3, a4);
|
||||
vfprintf (stderr, format, ap);
|
||||
va_end (ap);
|
||||
fprintf (stderr, "\n");
|
||||
exit (FATAL_EXIT_CODE);
|
||||
}
|
||||
|
@ -941,11 +957,22 @@ fancy_abort ()
|
|||
}
|
||||
|
||||
static void
|
||||
error (s, a1, a2)
|
||||
char *s;
|
||||
error 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, "genoutput: ");
|
||||
fprintf (stderr, s, a1, a2);
|
||||
vfprintf (stderr, format, ap);
|
||||
va_end (ap);
|
||||
fprintf (stderr, "\n");
|
||||
|
||||
have_error = 1;
|
||||
|
|
|
@ -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"
|
||||
|
@ -47,7 +52,7 @@ struct link
|
|||
};
|
||||
|
||||
char *xmalloc PROTO((unsigned));
|
||||
static void fatal ();
|
||||
static void fatal PVPROTO ((char *, ...)) ATTRIBUTE_PRINTF_1;
|
||||
void fancy_abort PROTO((void));
|
||||
|
||||
static int max_opno;
|
||||
|
@ -407,11 +412,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, "genpeep: ");
|
||||
fprintf (stderr, s, a1, a2);
|
||||
vfprintf (stderr, format, ap);
|
||||
va_end (ap);
|
||||
fprintf (stderr, "\n");
|
||||
exit (FATAL_EXIT_CODE);
|
||||
}
|
||||
|
|
|
@ -47,6 +47,11 @@ Boston, MA 02111-1307, USA. */
|
|||
it returns the split rtl in a SEQUENCE. */
|
||||
|
||||
#include "hconfig.h"
|
||||
#ifdef __STDC__
|
||||
#include <stdarg.h>
|
||||
#else
|
||||
#include <varargs.h>
|
||||
#endif
|
||||
#include "system.h"
|
||||
#include "rtl.h"
|
||||
#include "obstack.h"
|
||||
|
@ -191,7 +196,7 @@ static void change_state PROTO((char *, char *, int));
|
|||
static char *copystr PROTO((char *));
|
||||
static void mybzero PROTO((char *, unsigned));
|
||||
static void mybcopy PROTO((char *, char *, unsigned));
|
||||
static void fatal PROTO((char *));
|
||||
static void fatal PVPROTO((char *, ...)) ATTRIBUTE_PRINTF_1;
|
||||
char *xrealloc PROTO((char *, unsigned));
|
||||
char *xmalloc PROTO((unsigned));
|
||||
void fancy_abort PROTO((void));
|
||||
|
@ -1669,11 +1674,22 @@ xmalloc (size)
|
|||
}
|
||||
|
||||
static void
|
||||
fatal (s)
|
||||
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, "genrecog: ");
|
||||
fprintf (stderr, s);
|
||||
vfprintf (stderr, format, ap);
|
||||
va_end (ap);
|
||||
fprintf (stderr, "\n");
|
||||
fprintf (stderr, "after %d definitions\n", next_index);
|
||||
exit (FATAL_EXIT_CODE);
|
||||
|
|
Loading…
Reference in New Issue