This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

egcs-19980608: General warning fixes patch


Fri Jun 12 09:39:51 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.

	* 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.




diff -rup orig/egcs-19980608/gcc/Makefile.in egcs-19980608/gcc/Makefile.in
--- orig/egcs-19980608/gcc/Makefile.in	Mon Jun  8 14:30:11 1998
+++ egcs-19980608/gcc/Makefile.in	Thu Jun 11 17:02:35 1998
@@ -1255,7 +1255,8 @@ c-decl.o : c-decl.c $(CONFIG_H) system.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
diff -rup orig/egcs-19980608/gcc/c-lang.c egcs-19980608/gcc/c-lang.c
--- orig/egcs-19980608/gcc/c-lang.c	Sun Jun  7 10:06:45 1998
+++ egcs-19980608/gcc/c-lang.c	Thu Jun 11 17:02:35 1998
@@ -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.  */
diff -rup orig/egcs-19980608/gcc/config/sparc/sparc.c egcs-19980608/gcc/config/sparc/sparc.c
--- orig/egcs-19980608/gcc/config/sparc/sparc.c	Tue May 19 04:42:45 1998
+++ egcs-19980608/gcc/config/sparc/sparc.c	Thu Jun 11 17:02:35 1998
@@ -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;
diff -rup orig/egcs-19980608/gcc/except.c egcs-19980608/gcc/except.c
--- orig/egcs-19980608/gcc/except.c	Mon Jun  8 08:43:13 1998
+++ egcs-19980608/gcc/except.c	Thu Jun 11 17:02:35 1998
@@ -2447,7 +2447,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);
diff -rup orig/egcs-19980608/gcc/genrecog.c egcs-19980608/gcc/genrecog.c
--- orig/egcs-19980608/gcc/genrecog.c	Mon May 11 02:50:51 1998
+++ egcs-19980608/gcc/genrecog.c	Thu Jun 11 19:41:27 1998
@@ -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);
 }
diff -rup orig/egcs-19980608/gcc/reload1.c egcs-19980608/gcc/reload1.c
--- orig/egcs-19980608/gcc/reload1.c	Sat Jun  6 05:25:15 1998
+++ egcs-19980608/gcc/reload1.c	Thu Jun 11 17:02:36 1998
@@ -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"
diff -rup orig/egcs-19980608/gcc/rtl.h egcs-19980608/gcc/rtl.h
--- orig/egcs-19980608/gcc/rtl.h	Mon Jun  8 14:30:20 1998
+++ egcs-19980608/gcc/rtl.h	Thu Jun 11 17:02:36 1998
@@ -1421,6 +1421,9 @@ extern void mark_elimination		PROTO ((in
 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));
diff -rup orig/egcs-19980608/gcc/tree.c egcs-19980608/gcc/tree.c
--- orig/egcs-19980608/gcc/tree.c	Sun Jun  7 21:59:23 1998
+++ egcs-19980608/gcc/tree.c	Thu Jun 11 20:41:48 1998
@@ -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
diff -rup orig/egcs-19980608/gcc/varasm.c egcs-19980608/gcc/varasm.c
--- orig/egcs-19980608/gcc/varasm.c	Mon Jun  8 14:30:23 1998
+++ egcs-19980608/gcc/varasm.c	Thu Jun 11 17:02:36 1998
@@ -164,9 +164,11 @@ static void output_constructor		PROTO((t
 #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 */
 
 static enum in_section { no_section, in_text, in_data, in_named
 #ifdef BSS_SECTION_ASM_OP







Fri Jun 12 09:39:51 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>

	* cp-tree.h: Prototype function `check_java_method'.



diff -rup orig/egcs-19980608/gcc/cp/cp-tree.h egcs-19980608/gcc/cp/cp-tree.h
--- orig/egcs-19980608/gcc/cp/cp-tree.h	Mon Jun  8 13:52:35 1998
+++ egcs-19980608/gcc/cp/cp-tree.h	Thu Jun 11 17:02:35 1998
@@ -2416,6 +2416,7 @@ extern void revert_static_member_fn     
 extern void cat_namespace_levels                PROTO((void));
 
 /* in decl2.c */
+extern int check_java_method			PROTO((tree, tree));
 extern int flag_assume_nonnull_objects;
 extern int lang_decode_option			PROTO((char *));
 extern tree grok_method_quals			PROTO((tree, tree, tree));


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]