Warning fixes:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>
Sun, 11 Jun 2000 04:29:49 +0000 (04:29 +0000)
committerKaveh Ghazi <ghazi@gcc.gnu.org>
Sun, 11 Jun 2000 04:29:49 +0000 (04:29 +0000)
* 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

19 files changed:
gcc/ChangeLog
gcc/bb-reorder.c
gcc/calls.c
gcc/ch/ChangeLog
gcc/ch/Makefile.in
gcc/ch/lang.c
gcc/config/i386/i386.c
gcc/config/i386/i386.h
gcc/cp/ChangeLog
gcc/cp/decl2.c
gcc/f/ChangeLog
gcc/f/com.c
gcc/ifcvt.c
gcc/java/ChangeLog
gcc/java/decl.c
gcc/java/jcf-write.c
gcc/java/lang.c
gcc/libgcc2.h
gcc/regrename.c

index 1060c1f4c4a174472e17468735c553c5d6565ab5..db4cb70b1458ed22728a2f76db16cdf080391492 100644 (file)
@@ -1,3 +1,23 @@
+2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+       * 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  <mark@codesourcery.com>
 
        * Makefile.in (libintl.a): Depend on intl.all.
index 11624181e4480e6df097cf4863c44a48d99364a1..13943a8e3ee34d9e03bbcadcdec9123304ee1f86 100644 (file)
@@ -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;
index 27bd5fc9de006675f18e779239876989c151cb08..5892cba4ce19dce735350b90248d1b5d402010ca 100644 (file)
@@ -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;
 
index 18e04ff49918ae0239793542541b6c0396bb984a..624a63b020690bb7ab39f921b57f2f7dadabde90 100644 (file)
@@ -1,3 +1,12 @@
+2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+       * 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  <pthomas@suse.de>
 
        * Makefile.in(INTLLIBS): New macro.
index 65a2aa35fc62dc79dee0e3e94b0465d22ca9761c..4bc7e3b76bbdadc05f0922ba3815cd6d6d1d5a12 100644 (file)
@@ -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
index 7b62c16b4f2e265daa7ec0b6566f36e4488af9d5..86d300425ba6af5fc7fe7342e5a662639a6053f9 100644 (file)
@@ -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. 
index 23a868229aed7c1008c825f4568cf12cb1f5176d..f91692a1c36482bebf1fbf808f1933c70ea61be4 100644 (file)
@@ -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)
index 7dc6f9be3b018d7c7b13d0f40f71f9c24fcf0273..7bf706ca7b7577f2c947fc1a296722f2489783ce 100644 (file)
@@ -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.  */
index bc584e2f809e125f00f4737957f5df3c9ad8f865..f20402fc5bd7b8ac150c8076ed2091ffaaebd070 100644 (file)
@@ -1,3 +1,7 @@
+2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+       * decl2.c (compare_options): Don't needlessly cast away const-ness.
+
 2000-06-10  Mark Mitchell  <mark@codesourcery.com>
 
        * decl.c (add_binding): Handle duplicate declarations of external
index 6fc7bb5b98efba83d8b708cce3f6b3da64ba0dd5..5c36132d3913a4e9ef40125387977bdba358f0d5 100644 (file)
@@ -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.
index a60d88cfb08db6edf7a476104ece6aca2f17c554..a31553bf3709e85724cef4e0a8c5f385a73cc035 100644 (file)
@@ -1,3 +1,7 @@
+Sun Jun 11 00:03:00 2000  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+       * com.c (lang_get_alias_set): Mark parameter with ATTRIBUTE_UNUSED.
+
 2000-06-04  Philipp Thomas  <pthomas@suse.de>
 
        * Makefile.in(INTLLIBS): New macro.
index 5f08ef0bb6fb6daa6cd8f60946f2eb49a967eba1..7d593fd5b7a01684d3c03bac1e2d57770a9d7e7b 100644 (file)
@@ -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)
index 512983f5393020b16c27e9f080d59beb1320fe5e..7703d1e3289718d27d831c21acddeddfb6e90d2c 100644 (file)
@@ -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 */
index d1eec40d03c6aafc95ccb83a9c0e68d666e54202..ca638d747ab0ce0bc2acced18242069b0d59becd 100644 (file)
@@ -1,3 +1,12 @@
+2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+       * 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  <tromey@ferrule.cygnus.com>
 
        * parse.y (check_modifiers_consistency): Don't subtract out
index 7619d636c4ab29a74ba818140c4a3a289ac7dd25..06156330b596bdbb34ae4fc005941485b8abe93a 100644 (file)
@@ -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.  */
index 1dcebae43cfa27e83bb1981fdceb7fb40c94fdcf..64e490581ecfbf601054ee2eb87f00b263d76c3d 100644 (file)
@@ -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))
index 765a3be7a5a068ece3e193c93da2df1810efa09f..c86b568fb5f9fb58c8398747bea8dc82071054dc 100644 (file)
@@ -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;
 }
index 31f5a96c1ad56ef2fcfb24f9cc8b01f09fc13b90..fdb0f49513f4bbed4dd1bd6f3a9f22b428a04f9c 100644 (file)
@@ -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);
index d2afeeca26cc33be1f2a04ca16142a8a635d4dda..5f41f6bba0cb481313ea4c4165053bc79ed021eb 100644 (file)
@@ -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)