Commit 7f7f8214 by Kaveh R. Ghazi Committed by Kaveh Ghazi

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
parent 506b3b3a
Sun Oct 25 15:49:57 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* 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'.
Sun Oct 25 13:10:15 1998 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de> Sun Oct 25 13:10:15 1998 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>
* reload.c (push_reload): When merging reloads, make sure * reload.c (push_reload): When merging reloads, make sure
......
...@@ -1526,7 +1526,7 @@ final.o : final.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h $(REGS_H) \ ...@@ -1526,7 +1526,7 @@ final.o : final.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h $(REGS_H) \
toplev.h reload.h dwarfout.h dwarf2out.h sdbout.h dbxout.h toplev.h reload.h dwarfout.h dwarf2out.h sdbout.h dbxout.h
recog.o : recog.c $(CONFIG_H) system.h $(RTL_H) \ recog.o : recog.c $(CONFIG_H) system.h $(RTL_H) \
$(REGS_H) $(RECOG_H) hard-reg-set.h flags.h insn-config.h insn-attr.h \ $(REGS_H) $(RECOG_H) hard-reg-set.h flags.h insn-config.h insn-attr.h \
insn-flags.h insn-codes.h real.h insn-flags.h insn-codes.h real.h toplev.h
reg-stack.o : reg-stack.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) \ reg-stack.o : reg-stack.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) \
$(REGS_H) hard-reg-set.h flags.h insn-config.h insn-flags.h toplev.h $(REGS_H) hard-reg-set.h flags.h insn-config.h insn-flags.h toplev.h
dyn-string.o: dyn-string.c dyn-string.h $(CONFIG_H) system.h gansidecl.h dyn-string.o: dyn-string.c dyn-string.h $(CONFIG_H) system.h gansidecl.h
...@@ -1605,7 +1605,7 @@ s-codes : $(md_file) gencodes $(srcdir)/move-if-change ...@@ -1605,7 +1605,7 @@ s-codes : $(md_file) gencodes $(srcdir)/move-if-change
touch s-codes touch s-codes
insn-emit.o : insn-emit.c $(CONFIG_H) $(RTL_H) $(EXPR_H) real.h output.h \ insn-emit.o : insn-emit.c $(CONFIG_H) $(RTL_H) $(EXPR_H) real.h output.h \
insn-config.h insn-flags.h insn-codes.h system.h reload.h insn-config.h insn-flags.h insn-codes.h system.h reload.h recog.h
$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-emit.c $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-emit.c
insn-emit.c: s-emit ; @true insn-emit.c: s-emit ; @true
...@@ -1644,7 +1644,8 @@ s-extract : $(md_file) genextract $(srcdir)/move-if-change ...@@ -1644,7 +1644,8 @@ s-extract : $(md_file) genextract $(srcdir)/move-if-change
$(srcdir)/move-if-change tmp-extract.c insn-extract.c $(srcdir)/move-if-change tmp-extract.c insn-extract.c
touch s-extract touch s-extract
insn-peep.o : insn-peep.c $(CONFIG_H) $(RTL_H) $(REGS_H) output.h real.h system.h insn-peep.o : insn-peep.c $(CONFIG_H) $(RTL_H) $(REGS_H) output.h real.h \
system.h insn-config.h recog.h
$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-peep.c $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-peep.c
insn-peep.c: s-peep ; @true insn-peep.c: s-peep ; @true
......
...@@ -4632,7 +4632,6 @@ simplify_set (x) ...@@ -4632,7 +4632,6 @@ simplify_set (x)
&& exact_log2 (mask = nonzero_bits (op0, GET_MODE (op0))) >= 0) && exact_log2 (mask = nonzero_bits (op0, GET_MODE (op0))) >= 0)
{ {
rtx pat = PATTERN (other_insn), note = 0; rtx pat = PATTERN (other_insn), note = 0;
int scratches;
if ((recog_for_combine (&pat, other_insn, &note) < 0 if ((recog_for_combine (&pat, other_insn, &note) < 0
&& ! check_asm_operands (pat))) && ! check_asm_operands (pat)))
......
...@@ -2425,7 +2425,9 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes) ...@@ -2425,7 +2425,9 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes)
if (GET_CODE (body) == ADDR_VEC || GET_CODE (body) == ADDR_DIFF_VEC) if (GET_CODE (body) == ADDR_VEC || GET_CODE (body) == ADDR_DIFF_VEC)
{ {
#if !(defined(ASM_OUTPUT_ADDR_VEC) || defined(ASM_OUTPUT_ADDR_DIFF_VEC))
register int vlen, idx; register int vlen, idx;
#endif
if (prescan > 0) if (prescan > 0)
break; break;
......
...@@ -771,11 +771,11 @@ from the machine description file `md'. */\n\n"); ...@@ -771,11 +771,11 @@ from the machine description file `md'. */\n\n");
printf ("#include \"real.h\"\n"); printf ("#include \"real.h\"\n");
printf ("#include \"flags.h\"\n"); printf ("#include \"flags.h\"\n");
printf ("#include \"output.h\"\n"); printf ("#include \"output.h\"\n");
printf ("#include \"insn-config.h\"\n\n"); printf ("#include \"insn-config.h\"\n");
printf ("#include \"insn-flags.h\"\n\n"); printf ("#include \"insn-flags.h\"\n");
printf ("#include \"insn-codes.h\"\n\n"); printf ("#include \"insn-codes.h\"\n");
printf ("#include \"reload.h\"\n"); printf ("#include \"recog.h\"\n");
printf ("extern char *insn_operand_constraint[][MAX_RECOG_OPERANDS];\n\n"); printf ("#include \"reload.h\"\n\n");
printf ("extern rtx recog_operand[];\n"); printf ("extern rtx recog_operand[];\n");
printf ("#define operands emit_operand\n\n"); printf ("#define operands emit_operand\n\n");
printf ("#define FAIL return (end_sequence (), _val)\n"); printf ("#define FAIL return (end_sequence (), _val)\n");
......
...@@ -467,10 +467,12 @@ from the machine description file `md'. */\n\n"); ...@@ -467,10 +467,12 @@ from the machine description file `md'. */\n\n");
printf ("#include \"config.h\"\n"); printf ("#include \"config.h\"\n");
printf ("#include \"system.h\"\n"); printf ("#include \"system.h\"\n");
printf ("#include \"insn-config.h\"\n");
printf ("#include \"rtl.h\"\n"); printf ("#include \"rtl.h\"\n");
printf ("#include \"regs.h\"\n"); printf ("#include \"regs.h\"\n");
printf ("#include \"output.h\"\n"); printf ("#include \"output.h\"\n");
printf ("#include \"real.h\"\n"); printf ("#include \"real.h\"\n");
printf ("#include \"recog.h\"\n");
printf ("#include \"except.h\"\n\n"); printf ("#include \"except.h\"\n\n");
printf ("extern rtx peep_operand[];\n\n"); printf ("extern rtx peep_operand[];\n\n");
......
...@@ -31,6 +31,7 @@ Boston, MA 02111-1307, USA. */ ...@@ -31,6 +31,7 @@ Boston, MA 02111-1307, USA. */
#include "hard-reg-set.h" #include "hard-reg-set.h"
#include "flags.h" #include "flags.h"
#include "real.h" #include "real.h"
#include "toplev.h"
#ifndef STACK_PUSH_CODE #ifndef STACK_PUSH_CODE
#ifdef STACK_GROWS_DOWNWARD #ifdef STACK_GROWS_DOWNWARD
...@@ -1758,7 +1759,6 @@ extract_insn (insn) ...@@ -1758,7 +1759,6 @@ extract_insn (insn)
recog_n_operands = noperands = asm_noperands (body); recog_n_operands = noperands = asm_noperands (body);
if (noperands >= 0) if (noperands >= 0)
{ {
char *p;
/* This insn is an `asm' with operands. */ /* This insn is an `asm' with operands. */
/* expand_asm_operands makes sure there aren't too many operands. */ /* expand_asm_operands makes sure there aren't too many operands. */
......
...@@ -584,8 +584,8 @@ fix_register (name, fixed, call_used) ...@@ -584,8 +584,8 @@ fix_register (name, fixed, call_used)
&& (fixed == 0 || call_used == 0)) && (fixed == 0 || call_used == 0))
{ {
static char* what_option[2][2] = { static char* what_option[2][2] = {
"call-saved", "call-used", { "call-saved", "call-used" },
"no-such-option", "fixed" }; { "no-such-option", "fixed" }};
error ("can't use '%s' as a %s register", name, error ("can't use '%s' as a %s register", name,
what_option[fixed][call_used]); what_option[fixed][call_used]);
...@@ -1842,7 +1842,6 @@ allocate_reg_info (num_regs, new_p, renumber_p) ...@@ -1842,7 +1842,6 @@ allocate_reg_info (num_regs, new_p, renumber_p)
{ {
static size_t regno_allocated = 0; static size_t regno_allocated = 0;
static short *renumber = (short *)0; static short *renumber = (short *)0;
int i;
size_t size_info; size_t size_info;
size_t size_renumber; size_t size_renumber;
size_t min = (new_p) ? 0 : reg_n_max; size_t min = (new_p) ? 0 : reg_n_max;
...@@ -1937,6 +1936,8 @@ allocate_reg_info (num_regs, new_p, renumber_p) ...@@ -1937,6 +1936,8 @@ allocate_reg_info (num_regs, new_p, renumber_p)
{ {
size_t max = max_index; size_t max = max_index;
size_t local_min = min - min_index; size_t local_min = min - min_index;
size_t i;
if (min < min_index) if (min < min_index)
local_min = 0; local_min = 0;
if (!reg_data->used_p) /* page just allocated with calloc */ if (!reg_data->used_p) /* page just allocated with calloc */
......
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