Commit 85fda1eb by Kaveh R. Ghazi Committed by Kaveh Ghazi

genattr.c (fatal): Qualify a char* with the `const' keyword.

        * genattr.c (fatal): Qualify a char* with the `const' keyword.
        * genattrtab.c (fatal, attr_printf, attr_string, write_attr_set,
        write_unit_name, write_eligible_delay, expand_units,
        make_length_attrs, write_attr_case, find_attr,
        make_internal_attr): Likewise.
        * gencheck.c (tree_codes): Likewise.
        * gencodes.c (fatal): Likewise.
        * genconfig.c (fatal): Likewise.
        * genemit.c (fatal): Likewise.
        * genextract.c (fatal, walk_rtx, copystr): Likewise.
        * genflags.c (fatal): Likewise.
        * genopinit.c (fatal, optabs, gen_insn): Likewise.
        * genoutput.c (fatal, error, predicates): Likewise.
        * genpeep.c (fatal): Likewise.
        * genrecog.c (fatal, decision, pred_table, add_to_sequence,
        write_tree_1, write_tree, change_state, copystr, indents): Likewise.

From-SVN: r24377
parent 2069dfd8
Sat Dec 19 09:52:27 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* genattr.c (fatal): Qualify a char* with the `const' keyword.
* genattrtab.c (fatal, attr_printf, attr_string, write_attr_set,
write_unit_name, write_eligible_delay, expand_units,
make_length_attrs, write_attr_case, find_attr,
make_internal_attr): Likewise.
* gencheck.c (tree_codes): Likewise.
* gencodes.c (fatal): Likewise.
* genconfig.c (fatal): Likewise.
* genemit.c (fatal): Likewise.
* genextract.c (fatal, walk_rtx, copystr): Likewise.
* genflags.c (fatal): Likewise.
* genopinit.c (fatal, optabs, gen_insn): Likewise.
* genoutput.c (fatal, error, predicates): Likewise.
* genpeep.c (fatal): Likewise.
* genrecog.c (fatal, decision, pred_table, add_to_sequence,
write_tree_1, write_tree, change_state, copystr, indents): Likewise.
Thu Dec 17 18:21:49 1998 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> Thu Dec 17 18:21:49 1998 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
* configure.in (with-fast-fixincludes): Fix whitespace. * configure.in (with-fast-fixincludes): Fix whitespace.
......
...@@ -31,7 +31,7 @@ struct obstack *rtl_obstack = &obstack; ...@@ -31,7 +31,7 @@ struct obstack *rtl_obstack = &obstack;
#define obstack_chunk_alloc xmalloc #define obstack_chunk_alloc xmalloc
#define obstack_chunk_free free #define obstack_chunk_free free
static void fatal PVPROTO ((char *, ...)) static void fatal PVPROTO ((const char *, ...))
ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN; ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
void fancy_abort PROTO((void)) ATTRIBUTE_NORETURN; void fancy_abort PROTO((void)) ATTRIBUTE_NORETURN;
...@@ -221,17 +221,17 @@ xrealloc (ptr, size) ...@@ -221,17 +221,17 @@ xrealloc (ptr, size)
} }
static void static void
fatal VPROTO ((char *format, ...)) fatal VPROTO ((const char *format, ...))
{ {
#ifndef ANSI_PROTOTYPES #ifndef ANSI_PROTOTYPES
char *format; const char *format;
#endif #endif
va_list ap; va_list ap;
VA_START (ap, format); VA_START (ap, format);
#ifndef ANSI_PROTOTYPES #ifndef ANSI_PROTOTYPES
format = va_arg (ap, char *); format = va_arg (ap, const char *);
#endif #endif
fprintf (stderr, "genattr: "); fprintf (stderr, "genattr: ");
......
...@@ -119,7 +119,7 @@ struct obstack *temp_obstack = &obstack2; ...@@ -119,7 +119,7 @@ struct obstack *temp_obstack = &obstack2;
/* Define this so we can link with print-rtl.o to get debug_rtx function. */ /* Define this so we can link with print-rtl.o to get debug_rtx function. */
char **insn_name_ptr = 0; char **insn_name_ptr = 0;
static void fatal PVPROTO ((char *, ...)) static void fatal PVPROTO ((const char *, ...))
ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN; ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
void fancy_abort PROTO((void)) ATTRIBUTE_NORETURN; void fancy_abort PROTO((void)) ATTRIBUTE_NORETURN;
...@@ -365,8 +365,9 @@ rtx pic_offset_table_rtx; ...@@ -365,8 +365,9 @@ rtx pic_offset_table_rtx;
static void attr_hash_add_rtx PROTO((int, rtx)); static void attr_hash_add_rtx PROTO((int, rtx));
static void attr_hash_add_string PROTO((int, char *)); static void attr_hash_add_string PROTO((int, char *));
static rtx attr_rtx PVPROTO((enum rtx_code, ...)); static rtx attr_rtx PVPROTO((enum rtx_code, ...));
static char *attr_printf PVPROTO((int, char *, ...)); static char *attr_printf PVPROTO((int, const char *, ...))
static char *attr_string PROTO((char *, int)); ATTRIBUTE_PRINTF_2;
static char *attr_string PROTO((const char *, int));
static rtx check_attr_test PROTO((rtx, int)); static rtx check_attr_test PROTO((rtx, int));
static rtx check_attr_value PROTO((rtx, struct attr_desc *)); static rtx check_attr_value PROTO((rtx, struct attr_desc *));
static rtx convert_set_attr_alternative PROTO((rtx, int, int)); static rtx convert_set_attr_alternative PROTO((rtx, int, int));
...@@ -430,25 +431,26 @@ static int or_attr_value PROTO((rtx)); ...@@ -430,25 +431,26 @@ static int or_attr_value PROTO((rtx));
static void walk_attr_value PROTO((rtx)); static void walk_attr_value PROTO((rtx));
static void write_attr_get PROTO((struct attr_desc *)); static void write_attr_get PROTO((struct attr_desc *));
static rtx eliminate_known_true PROTO((rtx, rtx, int, int)); static rtx eliminate_known_true PROTO((rtx, rtx, int, int));
static void write_attr_set PROTO((struct attr_desc *, int, rtx, char *, static void write_attr_set PROTO((struct attr_desc *, int, rtx,
char *, rtx, int, int)); const char *, const char *, rtx,
int, int));
static void write_attr_case PROTO((struct attr_desc *, struct attr_value *, static void write_attr_case PROTO((struct attr_desc *, struct attr_value *,
int, char *, char *, int, rtx)); int, const char *, const char *, int, rtx));
static void write_unit_name PROTO((char *, int, char *)); static void write_unit_name PROTO((const char *, int, const char *));
static void write_attr_valueq PROTO((struct attr_desc *, char *)); static void write_attr_valueq PROTO((struct attr_desc *, char *));
static void write_attr_value PROTO((struct attr_desc *, rtx)); static void write_attr_value PROTO((struct attr_desc *, rtx));
static void write_upcase PROTO((char *)); static void write_upcase PROTO((char *));
static void write_indent PROTO((int)); static void write_indent PROTO((int));
static void write_eligible_delay PROTO((char *)); static void write_eligible_delay PROTO((const char *));
static void write_function_unit_info PROTO((void)); static void write_function_unit_info PROTO((void));
static void write_complex_function PROTO((struct function_unit *, char *, static void write_complex_function PROTO((struct function_unit *, const char *,
char *)); const char *));
static int write_expr_attr_cache PROTO((rtx, struct attr_desc *)); static int write_expr_attr_cache PROTO((rtx, struct attr_desc *));
static void write_toplevel_expr PROTO((rtx)); static void write_toplevel_expr PROTO((rtx));
static int n_comma_elts PROTO((char *)); static int n_comma_elts PROTO((char *));
static char *next_comma_elt PROTO((char **)); static char *next_comma_elt PROTO((char **));
static struct attr_desc *find_attr PROTO((char *, int)); static struct attr_desc *find_attr PROTO((const char *, int));
static void make_internal_attr PROTO((char *, rtx, int)); static void make_internal_attr PROTO((const char *, rtx, int));
static struct attr_value *find_most_used PROTO((struct attr_desc *)); static struct attr_value *find_most_used PROTO((struct attr_desc *));
static rtx find_single_value PROTO((struct attr_desc *)); static rtx find_single_value PROTO((struct attr_desc *));
static rtx make_numeric_value PROTO((int)); static rtx make_numeric_value PROTO((int));
...@@ -731,11 +733,11 @@ attr_rtx VPROTO((enum rtx_code code, ...)) ...@@ -731,11 +733,11 @@ attr_rtx VPROTO((enum rtx_code code, ...))
/*VARARGS2*/ /*VARARGS2*/
static char * static char *
attr_printf VPROTO((register int len, char *fmt, ...)) attr_printf VPROTO((register int len, const char *fmt, ...))
{ {
#ifndef ANSI_PROTOTYPES #ifndef ANSI_PROTOTYPES
register int len; register int len;
char *fmt; const char *fmt;
#endif #endif
va_list p; va_list p;
register char *str; register char *str;
...@@ -744,7 +746,7 @@ attr_printf VPROTO((register int len, char *fmt, ...)) ...@@ -744,7 +746,7 @@ attr_printf VPROTO((register int len, char *fmt, ...))
#ifndef ANSI_PROTOTYPES #ifndef ANSI_PROTOTYPES
len = va_arg (p, int); len = va_arg (p, int);
fmt = va_arg (p, char *); fmt = va_arg (p, const char *);
#endif #endif
/* Print the string into a temporary location. */ /* Print the string into a temporary location. */
...@@ -775,7 +777,7 @@ attr_numeral (n) ...@@ -775,7 +777,7 @@ attr_numeral (n)
static char * static char *
attr_string (str, len) attr_string (str, len)
char *str; const char *str;
int len; int len;
{ {
register struct attr_hash *h; register struct attr_hash *h;
...@@ -1815,7 +1817,7 @@ expand_units () ...@@ -1815,7 +1817,7 @@ expand_units ()
rtx unitsmask; rtx unitsmask;
rtx readycost; rtx readycost;
rtx newexp; rtx newexp;
char *str; const char *str;
int i, j, u, num, nvalues; int i, j, u, num, nvalues;
/* Rebuild the condition for the unit to share the RTL expressions. /* Rebuild the condition for the unit to share the RTL expressions.
...@@ -2384,9 +2386,9 @@ substitute_address (exp, no_address_fn, address_fn) ...@@ -2384,9 +2386,9 @@ substitute_address (exp, no_address_fn, address_fn)
static void static void
make_length_attrs () make_length_attrs ()
{ {
static char *new_names[] = {"*insn_default_length", static const char *new_names[] = {"*insn_default_length",
"*insn_variable_length_p", "*insn_variable_length_p",
"*insn_current_length"}; "*insn_current_length"};
static rtx (*no_address_fn[]) PROTO((rtx)) = {identity_fn, zero_fn, zero_fn}; static rtx (*no_address_fn[]) PROTO((rtx)) = {identity_fn, zero_fn, zero_fn};
static rtx (*address_fn[]) PROTO((rtx)) = {max_fn, one_fn, identity_fn}; static rtx (*address_fn[]) PROTO((rtx)) = {max_fn, one_fn, identity_fn};
size_t i; size_t i;
...@@ -4921,8 +4923,8 @@ write_attr_set (attr, indent, value, prefix, suffix, known_true, ...@@ -4921,8 +4923,8 @@ write_attr_set (attr, indent, value, prefix, suffix, known_true,
struct attr_desc *attr; struct attr_desc *attr;
int indent; int indent;
rtx value; rtx value;
char *prefix; const char *prefix;
char *suffix; const char *suffix;
rtx known_true; rtx known_true;
int insn_code, insn_index; int insn_code, insn_index;
{ {
...@@ -5018,7 +5020,7 @@ write_attr_case (attr, av, write_case_lines, prefix, suffix, indent, ...@@ -5018,7 +5020,7 @@ write_attr_case (attr, av, write_case_lines, prefix, suffix, indent,
struct attr_desc *attr; struct attr_desc *attr;
struct attr_value *av; struct attr_value *av;
int write_case_lines; int write_case_lines;
char *prefix, *suffix; const char *prefix, *suffix;
int indent; int indent;
rtx known_true; rtx known_true;
{ {
...@@ -5174,9 +5176,9 @@ write_toplevel_expr (p) ...@@ -5174,9 +5176,9 @@ write_toplevel_expr (p)
static void static void
write_unit_name (prefix, num, suffix) write_unit_name (prefix, num, suffix)
char *prefix; const char *prefix;
int num; int num;
char *suffix; const char *suffix;
{ {
struct function_unit *unit; struct function_unit *unit;
...@@ -5212,7 +5214,7 @@ write_attr_valueq (attr, s) ...@@ -5212,7 +5214,7 @@ write_attr_valueq (attr, s)
else else
{ {
int i; int i;
char *sep = " /* units: "; const char *sep = " /* units: ";
for (i = 0, num = ~num; num; i++, num >>= 1) for (i = 0, num = ~num; num; i++, num >>= 1)
if (num & 1) if (num & 1)
{ {
...@@ -5284,7 +5286,7 @@ write_indent (indent) ...@@ -5284,7 +5286,7 @@ write_indent (indent)
static void static void
write_eligible_delay (kind) write_eligible_delay (kind)
char *kind; const char *kind;
{ {
struct delay_desc *delay; struct delay_desc *delay;
int max_slots; int max_slots;
...@@ -5473,7 +5475,7 @@ write_function_unit_info () ...@@ -5473,7 +5475,7 @@ write_function_unit_info ()
static void static void
write_complex_function (unit, name, connection) write_complex_function (unit, name, connection)
struct function_unit *unit; struct function_unit *unit;
char *name, *connection; const char *name, *connection;
{ {
struct attr_desc *case_attr, *attr; struct attr_desc *case_attr, *attr;
struct attr_value *av, *common_av; struct attr_value *av, *common_av;
...@@ -5614,7 +5616,7 @@ next_comma_elt (pstr) ...@@ -5614,7 +5616,7 @@ next_comma_elt (pstr)
static struct attr_desc * static struct attr_desc *
find_attr (name, create) find_attr (name, create)
char *name; const char *name;
int create; int create;
{ {
struct attr_desc *attr; struct attr_desc *attr;
...@@ -5652,7 +5654,7 @@ find_attr (name, create) ...@@ -5652,7 +5654,7 @@ find_attr (name, create)
static void static void
make_internal_attr (name, value, special) make_internal_attr (name, value, special)
char *name; const char *name;
rtx value; rtx value;
int special; int special;
{ {
...@@ -5812,17 +5814,17 @@ copy_rtx_unchanging (orig) ...@@ -5812,17 +5814,17 @@ copy_rtx_unchanging (orig)
} }
static void static void
fatal VPROTO ((char *format, ...)) fatal VPROTO ((const char *format, ...))
{ {
#ifndef ANSI_PROTOTYPES #ifndef ANSI_PROTOTYPES
char *format; const char *format;
#endif #endif
va_list ap; va_list ap;
VA_START (ap, format); VA_START (ap, format);
#ifndef ANSI_PROTOTYPES #ifndef ANSI_PROTOTYPES
format = va_arg (ap, char *); format = va_arg (ap, const char *);
#endif #endif
fprintf (stderr, "genattrtab: "); fprintf (stderr, "genattrtab: ");
......
...@@ -23,7 +23,7 @@ Boston, MA 02111-1307, USA. */ ...@@ -23,7 +23,7 @@ Boston, MA 02111-1307, USA. */
#define DEFTREECODE(SYM, NAME, TYPE, LEN) STRINGIFY(SYM), #define DEFTREECODE(SYM, NAME, TYPE, LEN) STRINGIFY(SYM),
char *tree_codes[] = { const char *tree_codes[] = {
#include "tree.def" #include "tree.def"
#include "gencheck.h" #include "gencheck.h"
(char*)0 (char*)0
......
...@@ -33,7 +33,7 @@ struct obstack *rtl_obstack = &obstack; ...@@ -33,7 +33,7 @@ struct obstack *rtl_obstack = &obstack;
#define obstack_chunk_alloc xmalloc #define obstack_chunk_alloc xmalloc
#define obstack_chunk_free free #define obstack_chunk_free free
static void fatal PVPROTO ((char *, ...)) static void fatal PVPROTO ((const char *, ...))
ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN; ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
void fancy_abort PROTO((void)) ATTRIBUTE_NORETURN; void fancy_abort PROTO((void)) ATTRIBUTE_NORETURN;
...@@ -79,17 +79,17 @@ xrealloc (ptr, size) ...@@ -79,17 +79,17 @@ xrealloc (ptr, size)
} }
static void static void
fatal VPROTO ((char *format, ...)) fatal VPROTO ((const char *format, ...))
{ {
#ifndef ANSI_PROTOTYPES #ifndef ANSI_PROTOTYPES
char *format; const char *format;
#endif #endif
va_list ap; va_list ap;
VA_START (ap, format); VA_START (ap, format);
#ifndef ANSI_PROTOTYPES #ifndef ANSI_PROTOTYPES
format = va_arg (ap, char *); format = va_arg (ap, const char *);
#endif #endif
fprintf (stderr, "gencodes: "); fprintf (stderr, "gencodes: ");
......
...@@ -49,7 +49,7 @@ static int max_insns_per_split = 1; ...@@ -49,7 +49,7 @@ static int max_insns_per_split = 1;
static int clobbers_seen_this_insn; static int clobbers_seen_this_insn;
static int dup_operands_seen_this_insn; static int dup_operands_seen_this_insn;
static void fatal PVPROTO ((char *, ...)) static void fatal PVPROTO ((const char *, ...))
ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN; ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
void fancy_abort PROTO((void)) ATTRIBUTE_NORETURN; void fancy_abort PROTO((void)) ATTRIBUTE_NORETURN;
...@@ -268,17 +268,17 @@ xrealloc (ptr, size) ...@@ -268,17 +268,17 @@ xrealloc (ptr, size)
} }
static void static void
fatal VPROTO ((char *format, ...)) fatal VPROTO ((const char *format, ...))
{ {
#ifndef ANSI_PROTOTYPES #ifndef ANSI_PROTOTYPES
char *format; const char *format;
#endif #endif
va_list ap; va_list ap;
VA_START (ap, format); VA_START (ap, format);
#ifndef ANSI_PROTOTYPES #ifndef ANSI_PROTOTYPES
format = va_arg (ap, char *); format = va_arg (ap, const char *);
#endif #endif
fprintf (stderr, "genconfig: "); fprintf (stderr, "genconfig: ");
......
...@@ -30,7 +30,7 @@ struct obstack *rtl_obstack = &obstack; ...@@ -30,7 +30,7 @@ struct obstack *rtl_obstack = &obstack;
#define obstack_chunk_alloc xmalloc #define obstack_chunk_alloc xmalloc
#define obstack_chunk_free free #define obstack_chunk_free free
static void fatal PVPROTO ((char *, ...)) static void fatal PVPROTO ((const char *, ...))
ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN; ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
void fancy_abort PROTO((void)) ATTRIBUTE_NORETURN; void fancy_abort PROTO((void)) ATTRIBUTE_NORETURN;
...@@ -702,17 +702,17 @@ xrealloc (ptr, size) ...@@ -702,17 +702,17 @@ xrealloc (ptr, size)
} }
static void static void
fatal VPROTO ((char *format, ...)) fatal VPROTO ((const char *format, ...))
{ {
#ifndef ANSI_PROTOTYPES #ifndef ANSI_PROTOTYPES
char *format; const char *format;
#endif #endif
va_list ap; va_list ap;
VA_START (ap, format); VA_START (ap, format);
#ifndef ANSI_PROTOTYPES #ifndef ANSI_PROTOTYPES
format = va_arg (ap, char *); format = va_arg (ap, const char *);
#endif #endif
fprintf (stderr, "genemit: "); fprintf (stderr, "genemit: ");
......
...@@ -96,11 +96,11 @@ static int dupnums[MAX_DUP_OPERANDS]; ...@@ -96,11 +96,11 @@ static int dupnums[MAX_DUP_OPERANDS];
static struct code_ptr *peepholes; static struct code_ptr *peepholes;
static void gen_insn PROTO ((rtx)); static void gen_insn PROTO ((rtx));
static void walk_rtx PROTO ((rtx, char *)); static void walk_rtx PROTO ((rtx, const char *));
static void print_path PROTO ((char *)); static void print_path PROTO ((char *));
static void fatal PVPROTO ((char *, ...)) static void fatal PVPROTO ((const char *, ...))
ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN; ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
static char *copystr PROTO ((char *)); static char *copystr PROTO ((const char *));
static void mybzero (); static void mybzero ();
void fancy_abort PROTO ((void)) ATTRIBUTE_NORETURN; void fancy_abort PROTO ((void)) ATTRIBUTE_NORETURN;
...@@ -187,7 +187,7 @@ gen_insn (insn) ...@@ -187,7 +187,7 @@ gen_insn (insn)
static void static void
walk_rtx (x, path) walk_rtx (x, path)
rtx x; rtx x;
char *path; const char *path;
{ {
register RTX_CODE code; register RTX_CODE code;
register int i; register int i;
...@@ -369,17 +369,17 @@ xrealloc (ptr, size) ...@@ -369,17 +369,17 @@ xrealloc (ptr, size)
} }
static void static void
fatal VPROTO ((char *format, ...)) fatal VPROTO ((const char *format, ...))
{ {
#ifndef ANSI_PROTOTYPES #ifndef ANSI_PROTOTYPES
char *format; const char *format;
#endif #endif
va_list ap; va_list ap;
VA_START (ap, format); VA_START (ap, format);
#ifndef ANSI_PROTOTYPES #ifndef ANSI_PROTOTYPES
format = va_arg (ap, char *); format = va_arg (ap, const char *);
#endif #endif
fprintf (stderr, "genextract: "); fprintf (stderr, "genextract: ");
...@@ -400,7 +400,7 @@ fancy_abort () ...@@ -400,7 +400,7 @@ fancy_abort ()
static char * static char *
copystr (s1) copystr (s1)
char *s1; const char *s1;
{ {
register char *tem; register char *tem;
......
...@@ -33,7 +33,7 @@ struct obstack *rtl_obstack = &obstack; ...@@ -33,7 +33,7 @@ struct obstack *rtl_obstack = &obstack;
#define obstack_chunk_alloc xmalloc #define obstack_chunk_alloc xmalloc
#define obstack_chunk_free free #define obstack_chunk_free free
static void fatal PVPROTO ((char *, ...)) static void fatal PVPROTO ((const char *, ...))
ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN; ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
void fancy_abort PROTO((void)) ATTRIBUTE_NORETURN; void fancy_abort PROTO((void)) ATTRIBUTE_NORETURN;
...@@ -199,17 +199,17 @@ xrealloc (ptr, size) ...@@ -199,17 +199,17 @@ xrealloc (ptr, size)
} }
static void static void
fatal VPROTO ((char *format, ...)) fatal VPROTO ((const char *format, ...))
{ {
#ifndef ANSI_PROTOTYPES #ifndef ANSI_PROTOTYPES
char *format; const char *format;
#endif #endif
va_list ap; va_list ap;
VA_START (ap, format); VA_START (ap, format);
#ifndef ANSI_PROTOTYPES #ifndef ANSI_PROTOTYPES
format = va_arg (ap, char *); format = va_arg (ap, const char *);
#endif #endif
fprintf (stderr, "genflags: "); fprintf (stderr, "genflags: ");
......
...@@ -30,7 +30,7 @@ struct obstack *rtl_obstack = &obstack; ...@@ -30,7 +30,7 @@ struct obstack *rtl_obstack = &obstack;
#define obstack_chunk_alloc xmalloc #define obstack_chunk_alloc xmalloc
#define obstack_chunk_free free #define obstack_chunk_free free
static void fatal PVPROTO ((char *, ...)) static void fatal PVPROTO ((const char *, ...))
ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN; ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
void fancy_abort PROTO((void)) ATTRIBUTE_NORETURN; void fancy_abort PROTO((void)) ATTRIBUTE_NORETURN;
...@@ -63,7 +63,7 @@ void fancy_abort PROTO((void)) ATTRIBUTE_NORETURN; ...@@ -63,7 +63,7 @@ void fancy_abort PROTO((void)) ATTRIBUTE_NORETURN;
/* The reason we use \% is to avoid sequences of the form %-capletter-% /* The reason we use \% is to avoid sequences of the form %-capletter-%
which SCCS treats as magic. This gets warnings which you should ignore. */ which SCCS treats as magic. This gets warnings which you should ignore. */
char *optabs[] = const char *optabs[] =
{ "extendtab[(int) %B][(int) %A][0] = CODE_FOR_%(extend%a\%b2%)", { "extendtab[(int) %B][(int) %A][0] = CODE_FOR_%(extend%a\%b2%)",
"extendtab[(int) %B][(int) %A][1] = CODE_FOR_%(zero_extend%a\%b2%)", "extendtab[(int) %B][(int) %A][1] = CODE_FOR_%(zero_extend%a\%b2%)",
"fixtab[(int) %A][(int) %B][0] = CODE_FOR_%(fix%F\%a%I\%b2%)", "fixtab[(int) %A][(int) %B][0] = CODE_FOR_%(fix%F\%a%I\%b2%)",
...@@ -134,7 +134,7 @@ gen_insn (insn) ...@@ -134,7 +134,7 @@ gen_insn (insn)
int m1, m2, op; int m1, m2, op;
size_t pindex; size_t pindex;
int i; int i;
char *np, *pp, *p, *q; const char *np, *pp, *p, *q;
/* Don't mention instructions whose names are the null string. /* Don't mention instructions whose names are the null string.
They are in the machine description just to be recognized. */ They are in the machine description just to be recognized. */
...@@ -304,17 +304,17 @@ xrealloc (ptr, size) ...@@ -304,17 +304,17 @@ xrealloc (ptr, size)
} }
static void static void
fatal VPROTO ((char *format, ...)) fatal VPROTO ((const char *format, ...))
{ {
#ifndef ANSI_PROTOTYPES #ifndef ANSI_PROTOTYPES
char *format; const char *format;
#endif #endif
va_list ap; va_list ap;
VA_START (ap, format); VA_START (ap, format);
#ifndef ANSI_PROTOTYPES #ifndef ANSI_PROTOTYPES
format = va_arg (ap, char *); format = va_arg (ap, const char *);
#endif #endif
fprintf (stderr, "genopinit: "); fprintf (stderr, "genopinit: ");
......
...@@ -107,10 +107,10 @@ struct obstack *rtl_obstack = &obstack; ...@@ -107,10 +107,10 @@ struct obstack *rtl_obstack = &obstack;
#define obstack_chunk_alloc xmalloc #define obstack_chunk_alloc xmalloc
#define obstack_chunk_free free #define obstack_chunk_free free
static void fatal PVPROTO ((char *, ...)) static void fatal PVPROTO ((const char *, ...))
ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN; ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
void fancy_abort PROTO((void)) ATTRIBUTE_NORETURN; void fancy_abort PROTO((void)) ATTRIBUTE_NORETURN;
static void error PVPROTO ((char *, ...)) ATTRIBUTE_PRINTF_1; static void error PVPROTO ((const char *, ...)) ATTRIBUTE_PRINTF_1;
static void mybcopy (); static void mybcopy ();
static void mybzero (); static void mybzero ();
static int n_occurrences PROTO((int, char *)); static int n_occurrences PROTO((int, char *));
...@@ -415,7 +415,7 @@ static int max_opno; ...@@ -415,7 +415,7 @@ static int max_opno;
static int num_dups; static int num_dups;
static char *constraints[MAX_MAX_OPERANDS]; static char *constraints[MAX_MAX_OPERANDS];
static int op_n_alternatives[MAX_MAX_OPERANDS]; static int op_n_alternatives[MAX_MAX_OPERANDS];
static char *predicates[MAX_MAX_OPERANDS]; static const char *predicates[MAX_MAX_OPERANDS];
static char address_p[MAX_MAX_OPERANDS]; static char address_p[MAX_MAX_OPERANDS];
static enum machine_mode modes[MAX_MAX_OPERANDS]; static enum machine_mode modes[MAX_MAX_OPERANDS];
static char strict_low[MAX_MAX_OPERANDS]; static char strict_low[MAX_MAX_OPERANDS];
...@@ -922,17 +922,17 @@ mybcopy (b1, b2, length) ...@@ -922,17 +922,17 @@ mybcopy (b1, b2, length)
} }
static void static void
fatal VPROTO ((char *format, ...)) fatal VPROTO ((const char *format, ...))
{ {
#ifndef ANSI_PROTOTYPES #ifndef ANSI_PROTOTYPES
char *format; const char *format;
#endif #endif
va_list ap; va_list ap;
VA_START (ap, format); VA_START (ap, format);
#ifndef ANSI_PROTOTYPES #ifndef ANSI_PROTOTYPES
format = va_arg (ap, char *); format = va_arg (ap, const char *);
#endif #endif
fprintf (stderr, "genoutput: "); fprintf (stderr, "genoutput: ");
...@@ -952,17 +952,17 @@ fancy_abort () ...@@ -952,17 +952,17 @@ fancy_abort ()
} }
static void static void
error VPROTO ((char *format, ...)) error VPROTO ((const char *format, ...))
{ {
#ifndef ANSI_PROTOTYPES #ifndef ANSI_PROTOTYPES
char *format; const char *format;
#endif #endif
va_list ap; va_list ap;
VA_START (ap, format); VA_START (ap, format);
#ifndef ANSI_PROTOTYPES #ifndef ANSI_PROTOTYPES
format = va_arg (ap, char *); format = va_arg (ap, const char *);
#endif #endif
fprintf (stderr, "genoutput: "); fprintf (stderr, "genoutput: ");
......
...@@ -46,7 +46,7 @@ struct link ...@@ -46,7 +46,7 @@ struct link
int vecelt; int vecelt;
}; };
static void fatal PVPROTO ((char *, ...)) static void fatal PVPROTO ((const char *, ...))
ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN; ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
void fancy_abort PROTO((void)) ATTRIBUTE_NORETURN; void fancy_abort PROTO((void)) ATTRIBUTE_NORETURN;
...@@ -407,17 +407,17 @@ xrealloc (ptr, size) ...@@ -407,17 +407,17 @@ xrealloc (ptr, size)
} }
static void static void
fatal VPROTO ((char *format, ...)) fatal VPROTO ((const char *format, ...))
{ {
#ifndef ANSI_PROTOTYPES #ifndef ANSI_PROTOTYPES
char *format; const char *format;
#endif #endif
va_list ap; va_list ap;
VA_START (ap, format); VA_START (ap, format);
#ifndef ANSI_PROTOTYPES #ifndef ANSI_PROTOTYPES
format = va_arg (ap, char *); format = va_arg (ap, const char *);
#endif #endif
fprintf (stderr, "genpeep: "); fprintf (stderr, "genpeep: ");
......
...@@ -86,7 +86,7 @@ struct decision ...@@ -86,7 +86,7 @@ struct decision
int elt_one_int; /* Required value for XINT (rtl, 1) */ int elt_one_int; /* Required value for XINT (rtl, 1) */
int test_elt_zero_wide; /* Nonzero if should test XWINT (rtl, 0) */ int test_elt_zero_wide; /* Nonzero if should test XWINT (rtl, 0) */
HOST_WIDE_INT elt_zero_wide; /* Required value for XWINT (rtl, 0) */ HOST_WIDE_INT elt_zero_wide; /* Required value for XWINT (rtl, 0) */
char *tests; /* If nonzero predicate to call */ const char *tests; /* If nonzero predicate to call */
int pred; /* `preds' index of predicate or -1 */ int pred; /* `preds' index of predicate or -1 */
char *c_test; /* Additional test to perform */ char *c_test; /* Additional test to perform */
struct decision_head success; /* Nodes to test on success */ struct decision_head success; /* Nodes to test on success */
...@@ -137,7 +137,7 @@ static int max_depth; ...@@ -137,7 +137,7 @@ static int max_depth;
static struct pred_table static struct pred_table
{ {
char *name; const char *name;
RTX_CODE codes[NUM_RTX_CODE]; RTX_CODE codes[NUM_RTX_CODE];
} preds[] } preds[]
= {{"general_operand", {CONST_INT, CONST_DOUBLE, CONST, SYMBOL_REF, = {{"general_operand", {CONST_INT, CONST_DOUBLE, CONST, SYMBOL_REF,
...@@ -167,7 +167,7 @@ static struct pred_table ...@@ -167,7 +167,7 @@ static struct pred_table
static struct decision_head make_insn_sequence PROTO((rtx, enum routine_type)); static struct decision_head make_insn_sequence PROTO((rtx, enum routine_type));
static struct decision *add_to_sequence PROTO((rtx, struct decision_head *, static struct decision *add_to_sequence PROTO((rtx, struct decision_head *,
char *)); const char *));
static int not_both_true PROTO((struct decision *, struct decision *, static int not_both_true PROTO((struct decision *, struct decision *,
int)); int));
static int position_merit PROTO((struct decision *, enum machine_mode, static int position_merit PROTO((struct decision *, enum machine_mode,
...@@ -177,21 +177,21 @@ static struct decision_head merge_trees PROTO((struct decision_head, ...@@ -177,21 +177,21 @@ static struct decision_head merge_trees PROTO((struct decision_head,
static int break_out_subroutines PROTO((struct decision_head, static int break_out_subroutines PROTO((struct decision_head,
enum routine_type, int)); enum routine_type, int));
static void write_subroutine PROTO((struct decision *, enum routine_type)); static void write_subroutine PROTO((struct decision *, enum routine_type));
static void write_tree_1 PROTO((struct decision *, char *, static void write_tree_1 PROTO((struct decision *, const char *,
struct decision *, enum routine_type)); struct decision *, enum routine_type));
static void print_code PROTO((enum rtx_code)); static void print_code PROTO((enum rtx_code));
static int same_codes PROTO((struct decision *, enum rtx_code)); static int same_codes PROTO((struct decision *, enum rtx_code));
static void clear_codes PROTO((struct decision *)); static void clear_codes PROTO((struct decision *));
static int same_modes PROTO((struct decision *, enum machine_mode)); static int same_modes PROTO((struct decision *, enum machine_mode));
static void clear_modes PROTO((struct decision *)); static void clear_modes PROTO((struct decision *));
static void write_tree PROTO((struct decision *, char *, static void write_tree PROTO((struct decision *, const char *,
struct decision *, int, struct decision *, int,
enum routine_type)); enum routine_type));
static void change_state PROTO((char *, char *, int)); static void change_state PROTO((const char *, const char *, int));
static char *copystr PROTO((char *)); static char *copystr PROTO((const char *));
static void mybzero PROTO((char *, unsigned)); static void mybzero PROTO((char *, unsigned));
static void mybcopy PROTO((char *, char *, unsigned)); static void mybcopy PROTO((char *, char *, unsigned));
static void fatal PVPROTO((char *, ...)) static void fatal PVPROTO((const char *, ...))
ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN; ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
void fancy_abort PROTO((void)) ATTRIBUTE_NORETURN; void fancy_abort PROTO((void)) ATTRIBUTE_NORETURN;
...@@ -291,7 +291,7 @@ static struct decision * ...@@ -291,7 +291,7 @@ static struct decision *
add_to_sequence (pattern, last, position) add_to_sequence (pattern, last, position)
rtx pattern; rtx pattern;
struct decision_head *last; struct decision_head *last;
char *position; const char *position;
{ {
register RTX_CODE code; register RTX_CODE code;
register struct decision *new register struct decision *new
...@@ -1031,7 +1031,7 @@ write_subroutine (tree, type) ...@@ -1031,7 +1031,7 @@ write_subroutine (tree, type)
conditions or switch statements. We only support small indentations conditions or switch statements. We only support small indentations
and always indent at least two spaces. */ and always indent at least two spaces. */
static char *indents[] static const char *indents[]
= {" ", " ", " ", " ", " ", " ", " ", " ", = {" ", " ", " ", " ", " ", " ", " ", " ",
"\t", "\t ", "\t ", "\t ", "\t ", "\t ", "\t ", "\t", "\t ", "\t ", "\t ", "\t ", "\t ", "\t ",
"\t\t", "\t\t ", "\t\t ", "\t\t ", "\t\t ", "\t\t "}; "\t\t", "\t\t ", "\t\t ", "\t\t ", "\t\t ", "\t\t "};
...@@ -1060,7 +1060,7 @@ static char *indents[] ...@@ -1060,7 +1060,7 @@ static char *indents[]
static void static void
write_tree_1 (tree, prevpos, afterward, type) write_tree_1 (tree, prevpos, afterward, type)
struct decision *tree; struct decision *tree;
char *prevpos; const char *prevpos;
struct decision *afterward; struct decision *afterward;
enum routine_type type; enum routine_type type;
{ {
...@@ -1552,14 +1552,14 @@ clear_modes (p) ...@@ -1552,14 +1552,14 @@ clear_modes (p)
static void static void
write_tree (tree, prevpos, afterward, initial, type) write_tree (tree, prevpos, afterward, initial, type)
struct decision *tree; struct decision *tree;
char *prevpos; const char *prevpos;
struct decision *afterward; struct decision *afterward;
int initial; int initial;
enum routine_type type; enum routine_type type;
{ {
register struct decision *p; register struct decision *p;
char *name_prefix = (type == SPLIT ? "split" : "recog"); const char *name_prefix = (type == SPLIT ? "split" : "recog");
char *call_suffix = (type == SPLIT ? "" : ", pnum_clobbers"); const char *call_suffix = (type == SPLIT ? "" : ", pnum_clobbers");
if (! initial && tree->subroutine_number > 0) if (! initial && tree->subroutine_number > 0)
{ {
...@@ -1598,8 +1598,8 @@ write_tree (tree, prevpos, afterward, initial, type) ...@@ -1598,8 +1598,8 @@ write_tree (tree, prevpos, afterward, initial, type)
static void static void
change_state (oldpos, newpos, indent) change_state (oldpos, newpos, indent)
char *oldpos; const char *oldpos;
char *newpos; const char *newpos;
int indent; int indent;
{ {
int odepth = strlen (oldpos); int odepth = strlen (oldpos);
...@@ -1627,7 +1627,7 @@ change_state (oldpos, newpos, indent) ...@@ -1627,7 +1627,7 @@ change_state (oldpos, newpos, indent)
static char * static char *
copystr (s1) copystr (s1)
char *s1; const char *s1;
{ {
register char *tem; register char *tem;
...@@ -1681,17 +1681,17 @@ xmalloc (size) ...@@ -1681,17 +1681,17 @@ xmalloc (size)
} }
static void static void
fatal VPROTO ((char *format, ...)) fatal VPROTO ((const char *format, ...))
{ {
#ifndef ANSI_PROTOTYPES #ifndef ANSI_PROTOTYPES
char *format; const char *format;
#endif #endif
va_list ap; va_list ap;
VA_START (ap, format); VA_START (ap, format);
#ifndef ANSI_PROTOTYPES #ifndef ANSI_PROTOTYPES
format = va_arg (ap, char *); format = va_arg (ap, const char *);
#endif #endif
fprintf (stderr, "genrecog: "); fprintf (stderr, "genrecog: ");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment