egcs mainline, more warning patches ...

Kaveh R. Ghazi ghazi@caip.rutgers.edu
Tue Jul 21 11:27:00 GMT 1998


	Here are some more warning patches for the mainline sources.
Are they okay to install?

		--Kaveh


Mon Jul 20 15:19:46 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>

	* Makefile.in (fold-const.o): depend on $(RTL_H).

	* cplus-dem.c: Include config.h if it exists.  Also, only
	prototype malloc/realloc if we can't get stdlib.h.

	* fold-const.c: Include rtl.h to get the prototype for
 	`set_identifier_local_value'.

	* loop.c (express_from_1): Remove unused variable `tmp'.
	(combine_givs): cast the first argument of bzero to char *.

	* toplev.c (display_help): Remove unused variable `looking_for_start'.
	Add explicit braces to avoid ambiguous `else'.
	

diff -rup orig/egcs-CVS19980719/gcc/Makefile.in egcs-CVS19980719/gcc/Makefile.in
--- orig/egcs-CVS19980719/gcc/Makefile.in	Sun Jul 19 08:39:44 1998
+++ egcs-CVS19980719/gcc/Makefile.in	Mon Jul 20 14:51:05 1998
@@ -1365,7 +1365,8 @@ tree.o : tree.c $(CONFIG_H) system.h $(T
 print-tree.o : print-tree.c $(CONFIG_H) system.h $(TREE_H)
 stor-layout.o : stor-layout.c $(CONFIG_H) system.h $(TREE_H) flags.h \
    function.h $(EXPR_H) $(RTL_H) toplev.h except.h
-fold-const.o : fold-const.c $(CONFIG_H) system.h $(TREE_H) flags.h toplev.h
+fold-const.o : fold-const.c $(CONFIG_H) system.h $(TREE_H) flags.h toplev.h \
+   $(RTL_H)
 toplev.o : toplev.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) \
    flags.h input.h insn-attr.h xcoffout.h defaults.h output.h \
    insn-codes.h insn-config.h $(RECOG_H) Makefile toplev.h dwarfout.h \
diff -rup orig/egcs-CVS19980719/gcc/cplus-dem.c egcs-CVS19980719/gcc/cplus-dem.c
--- orig/egcs-CVS19980719/gcc/cplus-dem.c	Sun Jul 19 08:39:55 1998
+++ egcs-CVS19980719/gcc/cplus-dem.c	Mon Jul 20 14:54:08 1998
@@ -28,6 +28,10 @@ Boston, MA 02111-1307, USA.  */
 /* This file lives in both GCC and libiberty.  When making changes, please
    try not to break either.  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <ctype.h>
 #include <sys/types.h>
 #include <string.h>
@@ -35,6 +39,9 @@ Boston, MA 02111-1307, USA.  */
 
 #ifdef HAVE_STDLIB_H
 #include <stdlib.h>
+#else
+extern char * malloc ();
+extern char * realloc ();
 #endif
 
 #include <demangle.h>
@@ -3874,9 +3881,6 @@ fatal (str)
   fprintf (stderr, "%s: %s\n", program_name, str);
   exit (1);
 }
-
-char * malloc ();
-char * realloc ();
 
 char *
 xmalloc (size)
diff -rup orig/egcs-CVS19980719/gcc/fold-const.c egcs-CVS19980719/gcc/fold-const.c
--- orig/egcs-CVS19980719/gcc/fold-const.c	Sun Jul 19 08:40:09 1998
+++ egcs-CVS19980719/gcc/fold-const.c	Mon Jul 20 14:50:45 1998
@@ -47,6 +47,7 @@ Boston, MA 02111-1307, USA.  */
 #include <setjmp.h>
 #include "flags.h"
 #include "tree.h"
+#include "rtl.h"
 #include "toplev.h"
 
 /* Handle floating overflow for `const_binop'.  */
diff -rup orig/egcs-CVS19980719/gcc/loop.c egcs-CVS19980719/gcc/loop.c
--- orig/egcs-CVS19980719/gcc/loop.c	Sun Jul 19 08:40:43 1998
+++ egcs-CVS19980719/gcc/loop.c	Mon Jul 20 14:59:45 1998
@@ -6060,7 +6060,7 @@ express_from_1 (a, b, mult)
 
   if (GET_CODE (a) == PLUS)
     {
-      rtx ra, oa, tmp;
+      rtx ra, oa;
 
       ra = XEXP (a, 0), oa = XEXP (a, 1);
       if (rtx_equal_p (oa, b))
@@ -6258,10 +6258,10 @@ combine_givs (bl)
       giv_array[i++] = g1;
 
   stats = (struct combine_givs_stats *) alloca (giv_count * sizeof (*stats));
-  bzero (stats, giv_count * sizeof (*stats));
+  bzero ((char *) stats, giv_count * sizeof (*stats));
 
   can_combine = (rtx *) alloca (giv_count * giv_count * sizeof(rtx));
-  bzero (can_combine, giv_count * giv_count * sizeof(rtx));
+  bzero ((char *) can_combine, giv_count * giv_count * sizeof(rtx));
 
   for (i = 0; i < giv_count; i++)
     {
diff -rup orig/egcs-CVS19980719/gcc/toplev.c egcs-CVS19980719/gcc/toplev.c
--- orig/egcs-CVS19980719/gcc/toplev.c	Sun Jul 19 08:40:56 1998
+++ egcs-CVS19980719/gcc/toplev.c	Mon Jul 20 14:59:23 1998
@@ -4016,8 +4016,6 @@ display_help ()
   
   if (NUM_ELEM (documented_lang_options) > 1)
     {
-      int       looking_for_start = 0;
-      
       printf ("\nLanguage specific options:\n");
 
       for (i = 0; i < NUM_ELEM (documented_lang_options); i++)
@@ -4089,10 +4087,12 @@ display_help ()
 	}
 #endif
       if (undoc)
-	if (doc)
-	  printf ("\nThere are undocumented target specific options as well.\n");
-	else
-	  printf ("  They exist, but they are not documented.\n");
+	{
+	  if (doc)
+	    printf ("\nThere are undocumented target specific options as well.\n");
+	  else
+	    printf ("  They exist, but they are not documented.\n");
+	}
     }
 }
 

Mon Jul 20 15:19:46 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>

	* cp-tree.h (set_identifier_local_value): Provide prototype.

	* decl2.c (do_namespace_alias): Remove unused variables `binding'
	and `old'.
	
diff -rup orig/egcs-CVS19980719/gcc/cp/cp-tree.h egcs-CVS19980719/gcc/cp/cp-tree.h
--- orig/egcs-CVS19980719/gcc/cp/cp-tree.h	Sun Jul 19 08:39:33 1998
+++ egcs-CVS19980719/gcc/cp/cp-tree.h	Mon Jul 20 14:53:31 1998
@@ -2337,6 +2337,7 @@ extern tree perform_qualification_conver
 
 /* decl.c */
 /* resume_binding_level */
+extern void set_identifier_local_value		PROTO((tree, tree));
 extern int global_bindings_p			PROTO((void));
 extern int toplevel_bindings_p			PROTO((void));
 extern void keep_next_level			PROTO((void));
diff -rup orig/egcs-CVS19980719/gcc/cp/decl2.c egcs-CVS19980719/gcc/cp/decl2.c
--- orig/egcs-CVS19980719/gcc/cp/decl2.c	Sun Jul 19 08:39:36 1998
+++ egcs-CVS19980719/gcc/cp/decl2.c	Mon Jul 20 15:00:34 1998
@@ -4412,9 +4412,6 @@ void
 do_namespace_alias (alias, namespace)
      tree alias, namespace;
 {
-  tree binding;
-  tree old;
-
   if (TREE_CODE (namespace) != NAMESPACE_DECL)
     {
       /* The parser did not find it, so it's not there. */



Mon Jul 20 15:19:46 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>

	* cplus-dem.c: Include config.h if it exists.  Also, only
	prototype malloc/realloc if we can't get stdlib.h.


diff -rup orig/egcs-CVS19980719/libiberty/cplus-dem.c egcs-CVS19980719/libiberty/cplus-dem.c
--- orig/egcs-CVS19980719/libiberty/cplus-dem.c	Sun Jul 19 08:45:43 1998
+++ egcs-CVS19980719/libiberty/cplus-dem.c	Mon Jul 20 14:54:26 1998
@@ -28,6 +28,10 @@ Boston, MA 02111-1307, USA.  */
 /* This file lives in both GCC and libiberty.  When making changes, please
    try not to break either.  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <ctype.h>
 #include <sys/types.h>
 #include <string.h>
@@ -35,6 +39,9 @@ Boston, MA 02111-1307, USA.  */
 
 #ifdef HAVE_STDLIB_H
 #include <stdlib.h>
+#else
+extern char * malloc ();
+extern char * realloc ();
 #endif
 
 #include <demangle.h>
@@ -3874,9 +3881,6 @@ fatal (str)
   fprintf (stderr, "%s: %s\n", program_name, str);
   exit (1);
 }
-
-char * malloc ();
-char * realloc ();
 
 char *
 xmalloc (size)




More information about the Gcc-patches mailing list