Warning fixes:
authorghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 18 Jun 1998 06:46:35 +0000 (06:46 +0000)
committerghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 18 Jun 1998 06:46:35 +0000 (06:46 +0000)
        * Makefile.in (c-lang.o): Depend on output.h.
        * c-lang.c: Include output.h.
        * sparc.c (sparc_builtin_saveregs): Remove unused variable `fntype'.
        * except.c (expand_builtin_eh_stub): Likewise for variable `jump_to'.
        * genrecog.c (write_subroutine): When writing insn-recog.c, mark
        variables `insn', `pnum_clobbers', `x[0 .. max_depth]' and `tem'
        with ATTRIBUTE_UNUSED.
        * regmove.c (copy_src_to_dest): Make function static to match its
        prototype.
        * reload1.c Include hard-reg-set.h before rtl.h to get macro
        HARD_CONST.  Include machmode.h before hard-reg-set.h.
        * rtl.h: Prototype `retry_global_alloc' and wrap with macro
        HARD_CONST to protect usage of typedef HARD_REG_SET.
        * tree.c: Prototype `_obstack_allocated_p'.
        * varasm.c: Wrap prototype of `asm_output_aligned_bss' in macro
        BSS_SECTION_ASM_OP.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@20556 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/Makefile.in
gcc/c-lang.c
gcc/config/sparc/sparc.c
gcc/except.c
gcc/genrecog.c
gcc/regmove.c
gcc/reload1.c
gcc/rtl.h
gcc/tree.c
gcc/varasm.c

index 1f1440a..31bc065 100644 (file)
@@ -1,3 +1,31 @@
+Thu Jun 18 09:36:50 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+       * Makefile.in (c-lang.o): Depend on output.h.
+
+       * c-lang.c: Include output.h.
+
+       * sparc.c (sparc_builtin_saveregs): Remove unused variable `fntype'.
+
+       * except.c (expand_builtin_eh_stub): Likewise for variable `jump_to'.
+
+       * genrecog.c (write_subroutine): When writing insn-recog.c, mark
+       variables `insn', `pnum_clobbers', `x[0 .. max_depth]' and `tem'
+       with ATTRIBUTE_UNUSED.
+
+       * regmove.c (copy_src_to_dest): Make function static to match its
+       prototype.
+
+       * reload1.c Include hard-reg-set.h before rtl.h to get macro
+       HARD_CONST.  Include machmode.h before hard-reg-set.h.
+
+       * rtl.h: Prototype `retry_global_alloc' and wrap with macro
+       HARD_CONST to protect usage of typedef HARD_REG_SET.
+
+       * tree.c: Prototype `_obstack_allocated_p'.
+
+       * varasm.c: Wrap prototype of `asm_output_aligned_bss' in macro
+       BSS_SECTION_ASM_OP.
+
 Thu Jun 18 09:20:47 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
 
        * pa.c: Include system.h and toplev.h.  Remove redundant code.
index 8f6cbb7..10fab13 100644 (file)
@@ -1262,7 +1262,8 @@ c-decl.o : c-decl.c $(CONFIG_H) system.h $(TREE_H) c-tree.h c-lex.h flags.h \
     output.h toplev.h
 c-typeck.o : c-typeck.c $(CONFIG_H) system.h $(TREE_H) c-tree.h flags.h \
     output.h expr.h insn-codes.h $(RTL_H) toplev.h
-c-lang.o : c-lang.c $(CONFIG_H) system.h $(TREE_H) c-tree.h c-lex.h toplev.h
+c-lang.o : c-lang.c $(CONFIG_H) system.h $(TREE_H) c-tree.h c-lex.h toplev.h \
+    output.h
 c-lex.o : c-lex.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) c-lex.h c-tree.h \
     $(srcdir)/c-parse.h input.h flags.h $(srcdir)/c-gperf.h c-pragma.h \
     toplev.h output.h
index 4a21666..918bf6a 100644 (file)
@@ -26,6 +26,7 @@ Boston, MA 02111-1307, USA.  */
 #include "c-tree.h"
 #include "c-lex.h"
 #include "toplev.h"
+#include "output.h"
 
 /* Each of the functions defined here
    is an alternative to a function in objc-actions.c.  */
index 2270c62..204162e 100644 (file)
@@ -4669,7 +4669,6 @@ rtx
 sparc_builtin_saveregs (arglist)
      tree arglist;
 {
-  tree fntype = TREE_TYPE (current_function_decl);
   int first_reg = current_function_args_info.words;
   rtx address;
   int regno;
index d707a0e..9d89dd1 100644 (file)
@@ -2446,7 +2446,7 @@ expand_builtin_eh_stub ()
   rtx stub_start = gen_label_rtx ();
   rtx after_stub = gen_label_rtx ();
   rtx handler, offset;
-  rtx jump_to, temp;
+  rtx temp;
 
   emit_jump (after_stub);
   emit_label (stub_start);
index 5fc90f3..a4b14e3 100644 (file)
@@ -1003,19 +1003,19 @@ write_subroutine (tree, type)
     printf (", pnum_clobbers");
 
   printf (")\n");
-  printf ("     register rtx x0;\n     rtx insn;\n");
+  printf ("     register rtx x0;\n     rtx insn ATTRIBUTE_UNUSED;\n");
   if (type == RECOG)
-    printf ("     int *pnum_clobbers;\n");
+    printf ("     int *pnum_clobbers ATTRIBUTE_UNUSED;\n");
 
   printf ("{\n");
   printf ("  register rtx *ro = &recog_operand[0];\n");
 
   printf ("  register rtx ");
   for (i = 1; i < max_depth; i++)
-    printf ("x%d, ", i);
+    printf ("x%d ATTRIBUTE_UNUSED, ", i);
 
-  printf ("x%d;\n", max_depth);
-  printf ("  %s tem;\n", type == SPLIT ? "rtx" : "int");
+  printf ("x%d ATTRIBUTE_UNUSED;\n", max_depth);
+  printf ("  %s tem ATTRIBUTE_UNUSED;\n", type == SPLIT ? "rtx" : "int");
   write_tree (tree, "", NULL_PTR, 1, type);
   printf (" ret0: return %d;\n}\n\n", type == SPLIT ? 0 : -1);
 }
index 9dd5833..027f70a 100644 (file)
@@ -535,7 +535,7 @@ optimize_reg_copy_3 (insn, dest, src)
 /* If we were not able to update the users of src to use dest directly, try
    instead moving the value to dest directly before the operation.  */
 
-void
+static void
 copy_src_to_dest (insn, src, dest, loop_depth)
      rtx insn;
      rtx src;
index 0e22651..2373f88 100644 (file)
@@ -21,6 +21,9 @@ Boston, MA 02111-1307, USA.  */
 
 #include "config.h"
 #include "system.h"
+
+#include "machmode.h"
+#include "hard-reg-set.h"
 #include "rtl.h"
 #include "obstack.h"
 #include "insn-config.h"
@@ -29,7 +32,6 @@ Boston, MA 02111-1307, USA.  */
 #include "flags.h"
 #include "expr.h"
 #include "regs.h"
-#include "hard-reg-set.h"
 #include "reload.h"
 #include "recog.h"
 #include "basic-block.h"
index a9946ca..f8d23fa 100644 (file)
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -1422,6 +1422,9 @@ extern void mark_elimination              PROTO ((int, int));
 extern int global_alloc                        PROTO ((FILE *));
 extern void dump_global_regs           PROTO ((FILE *));
 #endif
+#ifdef HARD_CONST
+extern void retry_global_alloc         PROTO ((int, HARD_REG_SET));
+#endif
 
 /* In regclass.c */
 extern int reg_classes_intersect_p     PROTO ((enum reg_class, enum reg_class));
index 641eefe..f388cea 100644 (file)
@@ -50,6 +50,8 @@ Boston, MA 02111-1307, USA.  */
 
 #define obstack_chunk_alloc xmalloc
 #define obstack_chunk_free free
+/* obstack.[ch] explicitly declined to prototype this. */
+extern int _obstack_allocated_p PROTO ((struct obstack *h, GENERIC_PTR obj));
 
 /* Tree nodes of permanent duration are allocated in this obstack.
    They are the identifier nodes, and everything outside of
index d60bfcb..cd65c90 100644 (file)
@@ -164,9 +164,11 @@ static void output_constructor             PROTO((tree, int));
 #ifdef ASM_OUTPUT_BSS
 static void asm_output_bss             PROTO((FILE *, tree, char *, int, int));
 #endif
+#ifdef BSS_SECTION_ASM_OP
 #ifdef ASM_OUTPUT_ALIGNED_BSS
 static void asm_output_aligned_bss     PROTO((FILE *, tree, char *, int, int));
 #endif
+#endif /* BSS_SECTION_ASM_OP */
 \f
 static enum in_section { no_section, in_text, in_data, in_named
 #ifdef BSS_SECTION_ASM_OP