From 5ac9118ef9eac76fe38b89c6af869203a6980969 Mon Sep 17 00:00:00 2001 From: "Kaveh R. Ghazi" Date: Sun, 11 Jun 2000 04:29:49 +0000 Subject: Warning fixes: * bb-reorder.c (build_scope_forest): Initialize variable `curr_scope'. * calls.c (expand_call): Likewise for variables `save_pending_stack_adjust' and `save_stack_pointer_delta'. * i386.c (function_arg_advance, function_arg): Cast to avoid signed/unsigned warnings. * i386.h (MEMORY_MOVE_COST): Likewise. * ifcvt.c (cond_exec_process_if_block): Initialize variables `else_start' and `else_end'. * libgcc2.h (__eh_alloc, __eh_free): Prototype. * regrename.c (rr_replace_reg): Initialize variable `dest_subregno'. ch: * Makefile.in (EXPR_H): New dependency variable. (actions.o, expr.o): Use EXPR_H. (lang.o): Depend on RTL_H and EXPR_H. * lang.c: Include rtl.h and expr.h. (lang_get_alias_set): Mark parameter with ATTRIBUTE_UNUSED. cp: * decl2.c (compare_options): Don't needlessly cast away const-ness. f: * com.c (lang_get_alias_set): Mark parameter with ATTRIBUTE_UNUSED. java: * decl.c (create_primitive_vtable): Prototype. * jcf-write.c (generate_bytecode_insns): Initialize variable `saved_context'. * lang.c (lang_get_alias_set): Mark parameter with ATTRIBUTE_UNUSED. From-SVN: r34490 --- gcc/ChangeLog | 20 ++++++++++++++++++++ gcc/bb-reorder.c | 2 +- gcc/calls.c | 4 ++-- gcc/ch/ChangeLog | 9 +++++++++ gcc/ch/Makefile.in | 10 +++++----- gcc/ch/lang.c | 4 +++- gcc/config/i386/i386.c | 8 ++++---- gcc/config/i386/i386.h | 2 +- gcc/cp/ChangeLog | 4 ++++ gcc/cp/decl2.c | 2 +- gcc/f/ChangeLog | 4 ++++ gcc/f/com.c | 2 +- gcc/ifcvt.c | 4 ++-- gcc/java/ChangeLog | 9 +++++++++ gcc/java/decl.c | 1 + gcc/java/jcf-write.c | 2 +- gcc/java/lang.c | 2 +- gcc/libgcc2.h | 2 ++ gcc/regrename.c | 2 +- 19 files changed, 72 insertions(+), 21 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1060c1f..db4cb70 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,23 @@ +2000-06-11 Kaveh R. Ghazi + + * bb-reorder.c (build_scope_forest): Initialize variable + `curr_scope'. + + * calls.c (expand_call): Likewise for variables + `save_pending_stack_adjust' and `save_stack_pointer_delta'. + + * i386.c (function_arg_advance, function_arg): Cast to avoid + signed/unsigned warnings. + + * i386.h (MEMORY_MOVE_COST): Likewise. + + * ifcvt.c (cond_exec_process_if_block): Initialize variables + `else_start' and `else_end'. + + * libgcc2.h (__eh_alloc, __eh_free): Prototype. + + * regrename.c (rr_replace_reg): Initialize variable `dest_subregno'. + 2000-06-10 Mark Mitchell * Makefile.in (libintl.a): Depend on intl.all. diff --git a/gcc/bb-reorder.c b/gcc/bb-reorder.c index 1162418..13943a8 100644 --- a/gcc/bb-reorder.c +++ b/gcc/bb-reorder.c @@ -964,7 +964,7 @@ build_scope_forest (forest) rtx x; int level, bbi, i; basic_block curr_bb; - scope root, curr_scope; + scope root, curr_scope = 0; forest->num_trees = 0; forest->trees = NULL; diff --git a/gcc/calls.c b/gcc/calls.c index 27bd5fc..5892cba 100644 --- a/gcc/calls.c +++ b/gcc/calls.c @@ -2490,8 +2490,8 @@ expand_call (exp, target, ignore) recursion "call". That way we know any adjustment after the tail recursion call can be ignored if we indeed use the tail recursion call expansion. */ - int save_pending_stack_adjust; - int save_stack_pointer_delta; + int save_pending_stack_adjust = 0; + int save_stack_pointer_delta = 0; rtx insns; rtx before_call, next_arg_reg; diff --git a/gcc/ch/ChangeLog b/gcc/ch/ChangeLog index 18e04ff..624a63b 100644 --- a/gcc/ch/ChangeLog +++ b/gcc/ch/ChangeLog @@ -1,3 +1,12 @@ +2000-06-11 Kaveh R. Ghazi + + * Makefile.in (EXPR_H): New dependency variable. + (actions.o, expr.o): Use EXPR_H. + (lang.o): Depend on RTL_H and EXPR_H. + + * lang.c: Include rtl.h and expr.h. + (lang_get_alias_set): Mark parameter with ATTRIBUTE_UNUSED. + 2000-06-04 Philipp Thomas * Makefile.in(INTLLIBS): New macro. diff --git a/gcc/ch/Makefile.in b/gcc/ch/Makefile.in index 65a2aa3..4bc7e3b 100644 --- a/gcc/ch/Makefile.in +++ b/gcc/ch/Makefile.in @@ -249,6 +249,7 @@ native: config.status ../cc1chill$(exeext) ../chill # CHILL language specific files. +EXPR_H = $(srcdir)/../expr.h ../insn-codes.h RTL_H = $(srcdir)/../rtl.h $(srcdir)/../rtl.def \ $(srcdir)/../machmode.h $(srcdir)/../machmode.def TREE_H = $(srcdir)/../tree.h $(srcdir)/../real.h $(srcdir)/../tree.def \ @@ -274,8 +275,7 @@ $(srcdir)/hash.h: actions.o : actions.c $(CONFIG_H) $(CHILL_TREE_H) actions.h $(RTL_H) \ lex.h $(srcdir)/../flags.h $(srcdir)/../input.h \ - $(srcdir)/../expr.h ../insn-codes.h $(srcdir)/../system.h \ - $(srcdir)/../toplev.h + $(EXPR_H) $(srcdir)/../system.h $(srcdir)/../toplev.h convert.o : convert.c $(CONFIG_H) $(CHILL_TREE_H) $(srcdir)/../flags.h \ $(srcdir)/../tree.h $(srcdir)/../system.h $(srcdir)/../toplev.h \ $(srcdir)/../convert.h @@ -284,15 +284,15 @@ decl.o : decl.c $(CONFIG_H) $(CHILL_TREE_H) $(srcdir)/../flags.h lex.h \ except.o : except.c $(CONFIG_H) $(srcdir)/../tree.h $(RTL_H) $(CHILL_TREE_H) \ $(srcdir)/../system.h $(srcdir)/../toplev.h expr.o : expr.c $(CONFIG_H) $(RTL_H) $(CHILL_TREE_H) $(srcdir)/../flags.h \ - $(srcdir)/../expr.h ../insn-codes.h $(srcdir)/../tree.h lex.h \ - $(srcdir)/../system.h $(srcdir)/../toplev.h + $(EXPR_H) $(srcdir)/../tree.h lex.h $(srcdir)/../system.h \ + $(srcdir)/../toplev.h grant.o: grant.c $(CONFIG_H) $(CHILL_TREE_H) $(RTL_H) $(srcdir)/../flags.h \ $(srcdir)/../input.h lex.h actions.h $(srcdir)/../system.h \ $(srcdir)/../toplev.h $(srcdir)/../output.h inout.o : inout.c $(CONFIG_H) $(CHILL_TREE_H) $(srcdir)/../flags.h \ $(srcdir)/../input.h $(srcdir)/../system.h $(srcdir)/../toplev.h lang.o : lang.c $(CONFIG_H) $(CHILL_TREE_H) $(srcdir)/../input.h lex.h \ - $(srcdir)/../system.h $(srcdir)/../toplev.h + $(srcdir)/../system.h $(srcdir)/../toplev.h $(EXPR_H) $(RTL_H) lex.o : lex.c $(CONFIG_H) $(CHILL_TREE_H) $(RTL_H) $(srcdir)/../flags.h \ $(srcdir)/../input.h $(srcdir)/parse.h $(srcdir)/../system.h \ $(srcdir)/../toplev.h lex.h $(srcdir)/../dwarfout.h hash.h diff --git a/gcc/ch/lang.c b/gcc/ch/lang.c index 7b62c16..86d3004 100644 --- a/gcc/ch/lang.c +++ b/gcc/ch/lang.c @@ -26,6 +26,8 @@ Boston, MA 02111-1307, USA. */ #include "lex.h" #include "input.h" #include "toplev.h" +#include "rtl.h" +#include "expr.h" /* Type node for boolean types. */ @@ -288,7 +290,7 @@ incomplete_type_error (value, type) HOST_WIDE_INT lang_get_alias_set (t) - tree t; + tree t ATTRIBUTE_UNUSED; { /* ??? Need to figure out what the rules are. Certainly we'd need to handle union-like things, and probably variant records. diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 23a8682..f91692a 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -901,8 +901,8 @@ function_arg_advance (cum, mode, type, named) tree type; /* type of the argument or 0 if lib support */ int named; /* whether or not the argument was named */ { - int bytes - = (mode == BLKmode) ? int_size_in_bytes (type) : GET_MODE_SIZE (mode); + int bytes = + (mode == BLKmode) ? int_size_in_bytes (type) : (int) GET_MODE_SIZE (mode); int words = (bytes + UNITS_PER_WORD - 1) / UNITS_PER_WORD; if (TARGET_DEBUG_ARG) @@ -944,8 +944,8 @@ function_arg (cum, mode, type, named) int named; /* != 0 for normal args, == 0 for ... args */ { rtx ret = NULL_RTX; - int bytes - = (mode == BLKmode) ? int_size_in_bytes (type) : GET_MODE_SIZE (mode); + int bytes = + (mode == BLKmode) ? int_size_in_bytes (type) : (int) GET_MODE_SIZE (mode); int words = (bytes + UNITS_PER_WORD - 1) / UNITS_PER_WORD; switch (mode) diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h index 7dc6f9b..7bf706c 100644 --- a/gcc/config/i386/i386.h +++ b/gcc/config/i386/i386.h @@ -2093,7 +2093,7 @@ while (0) : (GET_MODE_SIZE (MODE)==2 \ ? (IN ? ix86_cost->int_load[1] : ix86_cost->int_store[1]) \ : ((IN ? ix86_cost->int_load[2] : ix86_cost->int_store[2]) \ - * GET_MODE_SIZE (MODE) / 4)))) + * (int) GET_MODE_SIZE (MODE) / 4)))) /* A C expression for the cost of a branch instruction. A value of 1 is the default; other values are interpreted relative to that. */ diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index bc584e2..f20402f 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,7 @@ +2000-06-11 Kaveh R. Ghazi + + * decl2.c (compare_options): Don't needlessly cast away const-ness. + 2000-06-10 Mark Mitchell * decl.c (add_binding): Handle duplicate declarations of external diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index 6fc7bb5..5c36132 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -581,7 +581,7 @@ compare_options (p1, p2) const PTR p1; const PTR p2; { - return strcmp (*((char **) p1), *((char **) p2)); + return strcmp (*((const char *const *) p1), *((const char *const *) p2)); } /* Decode the string P as a language-specific option. diff --git a/gcc/f/ChangeLog b/gcc/f/ChangeLog index a60d88c..a31553b 100644 --- a/gcc/f/ChangeLog +++ b/gcc/f/ChangeLog @@ -1,3 +1,7 @@ +Sun Jun 11 00:03:00 2000 Kaveh R. Ghazi + + * com.c (lang_get_alias_set): Mark parameter with ATTRIBUTE_UNUSED. + 2000-06-04 Philipp Thomas * Makefile.in(INTLLIBS): New macro. diff --git a/gcc/f/com.c b/gcc/f/com.c index 5f08ef0..7d593fd5 100644 --- a/gcc/f/com.c +++ b/gcc/f/com.c @@ -14875,7 +14875,7 @@ lang_identify () HOST_WIDE_INT lang_get_alias_set (t) - tree t; + tree t ATTRIBUTE_UNUSED; { /* We do not wish to use alias-set based aliasing at all. Used in the extreme (every object with its own set, with equivalences recorded) diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c index 512983f..7703d1e 100644 --- a/gcc/ifcvt.c +++ b/gcc/ifcvt.c @@ -307,8 +307,8 @@ cond_exec_process_if_block (test_bb, then_bb, else_bb, join_bb) rtx test_expr; /* expression in IF_THEN_ELSE that is tested */ rtx then_start; /* first insn in THEN block */ rtx then_end; /* last insn + 1 in THEN block */ - rtx else_start; /* first insn in ELSE block or NULL */ - rtx else_end; /* last insn + 1 in ELSE block */ + rtx else_start = NULL_RTX; /* first insn in ELSE block or NULL */ + rtx else_end = NULL_RTX; /* last insn + 1 in ELSE block */ int max; /* max # of insns to convert. */ int then_mod_ok; /* whether conditional mods are ok in THEN */ rtx true_expr; /* test for else block insns */ diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index d1eec40..ca638d7 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,12 @@ +2000-06-11 Kaveh R. Ghazi + + * decl.c (create_primitive_vtable): Prototype. + + * jcf-write.c (generate_bytecode_insns): Initialize variable + `saved_context'. + + * lang.c (lang_get_alias_set): Mark parameter with ATTRIBUTE_UNUSED. + Tue Jun 6 11:39:05 2000 Tom Tromey * parse.y (check_modifiers_consistency): Don't subtract out diff --git a/gcc/java/decl.c b/gcc/java/decl.c index 7619d63..0615633 100644 --- a/gcc/java/decl.c +++ b/gcc/java/decl.c @@ -48,6 +48,7 @@ static tree push_promoted_type PARAMS ((const char *, tree)); static struct binding_level *make_binding_level PARAMS ((void)); static boolean emit_init_test_initialization PARAMS ((struct hash_entry *, hash_table_key)); +static tree create_primitive_vtable PARAMS ((const char *)); /* Set to non-zero value in order to emit class initilization code before static field references. */ diff --git a/gcc/java/jcf-write.c b/gcc/java/jcf-write.c index 1dcebae..64e4905 100644 --- a/gcc/java/jcf-write.c +++ b/gcc/java/jcf-write.c @@ -2534,7 +2534,7 @@ generate_bytecode_insns (exp, target, state) NOTE_POP (1); /* Pop implicit this. */ if (TREE_CODE (f) == FUNCTION_DECL && DECL_CONTEXT (f) != NULL_TREE) { - tree saved_context; + tree saved_context = NULL_TREE; int index, interface = 0; RESERVE (5); if (METHOD_STATIC (f)) diff --git a/gcc/java/lang.c b/gcc/java/lang.c index 765a3be..c86b568 100644 --- a/gcc/java/lang.c +++ b/gcc/java/lang.c @@ -652,7 +652,7 @@ lang_print_xnode (file, node, indent) HOST_WIDE_INT lang_get_alias_set (t) - tree t; + tree t ATTRIBUTE_UNUSED; { return -1; } diff --git a/gcc/libgcc2.h b/gcc/libgcc2.h index 31f5a96..fdb0f49 100644 --- a/gcc/libgcc2.h +++ b/gcc/libgcc2.h @@ -42,6 +42,8 @@ extern void __sjthrow (void) __attribute__ ((__noreturn__)); extern void __sjpopnthrow (void) __attribute__ ((__noreturn__)); extern void __eprintf (const char *, const char *, unsigned int, const char *) __attribute__ ((__noreturn__)); +extern void *__eh_alloc (size_t); +extern void __eh_free (void *); struct bb; extern void __bb_exit_func (void); diff --git a/gcc/regrename.c b/gcc/regrename.c index d2afeec..5f41f6b 100644 --- a/gcc/regrename.c +++ b/gcc/regrename.c @@ -671,7 +671,7 @@ rr_replace_reg (x, reg_use, reg_sub, replace_type, insn, status) replace_type, insn, status); else if (replace_type == SOURCE) { - unsigned int dest_subregno; + unsigned int dest_subregno = 0; int had_subreg = GET_CODE (SET_DEST (x)) == SUBREG; if (had_subreg) -- cgit v1.1