From 7f7f8214d89ae2bdf81fe00164dd0425963c84e7 Mon Sep 17 00:00:00 2001 From: "Kaveh R. Ghazi" Date: Sun, 25 Oct 1998 12:56:39 +0000 Subject: Warning fixes: * Makefile.in (recog.o): Depend on toplev.h. (insn-emit.o): Depend on recog.h. (insn-peep.o): Depend on recog.h and insn-config.h. * combine.c (simplify_set): Remove unused variable `scratches'. * final.c (final_scan_insn): Wrap declaration of variables `vlen' and `idx' in macro conditional controlling their use. * genemit.c (main): Make the generated output file include recog.h. Don't have it declare `insn_operand_constraint', since we get it from recog.h. * genpeep.c (main): Make the generated output file include insn-config.h and recog.h. * recog.c: Include toplev.h. (extract_insn): Remove unused variable `p'. * regclass.c (fix_register): Add missing braces around initializer for `what_option'. (allocate_reg_info): Move variable `i' into the scope where it is used. Change its type to `size_t'. From-SVN: r23307 --- gcc/regclass.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'gcc/regclass.c') diff --git a/gcc/regclass.c b/gcc/regclass.c index ef1dce2..5c23453 100644 --- a/gcc/regclass.c +++ b/gcc/regclass.c @@ -584,8 +584,8 @@ fix_register (name, fixed, call_used) && (fixed == 0 || call_used == 0)) { static char* what_option[2][2] = { - "call-saved", "call-used", - "no-such-option", "fixed" }; + { "call-saved", "call-used" }, + { "no-such-option", "fixed" }}; error ("can't use '%s' as a %s register", name, what_option[fixed][call_used]); @@ -1842,7 +1842,6 @@ allocate_reg_info (num_regs, new_p, renumber_p) { static size_t regno_allocated = 0; static short *renumber = (short *)0; - int i; size_t size_info; size_t size_renumber; size_t min = (new_p) ? 0 : reg_n_max; @@ -1937,6 +1936,8 @@ allocate_reg_info (num_regs, new_p, renumber_p) { size_t max = max_index; size_t local_min = min - min_index; + size_t i; + if (min < min_index) local_min = 0; if (!reg_data->used_p) /* page just allocated with calloc */ -- cgit v1.1