Patch for some warnings in ra-rewrite.c & ra-debug.c

Kaveh R. Ghazi ghazi@caip.rutgers.edu
Thu Aug 1 13:07:00 GMT 2002


The patch below fixes these generic warnings:
 > ra-rewrite.c:1147: warning: signed and unsigned type in conditional expression
 > ra-rewrite.c:1233: warning: signed and unsigned type in conditional expression
 > ra-rewrite.c:1250: warning: signed and unsigned type in conditional expression

and also these on mips platforms:
 > ra-debug.c:253: warning: implicit declaration of function `mips_hard_regno_nregs'
 > ra-debug.c:280: warning: function `mips_hard_regno_nregs' was previously declared within a block

Bootstrapped on mips-sgi-irix6.2 and sparc-sun-solaris2.7.
Ok to install?

		Thanks,
		--Kaveh


2002-08-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>

	* Makefile.in (ra-debug.o): Depend on $(TM_P_H).
	* ra-debug.c: Include "tm_p.h".
	* ra-rewrite.c (is_partly_live_1): Change return type to bool.
	
diff -rup orig/egcc-CVS20020730/gcc/Makefile.in egcc-CVS20020730/gcc/Makefile.in
--- orig/egcc-CVS20020730/gcc/Makefile.in	2002-07-29 16:00:10.000000000 -0400
+++ egcc-CVS20020730/gcc/Makefile.in	2002-07-31 14:53:33.456072163 -0400
@@ -1567,7 +1567,8 @@ ra-build.o : ra-build.c $(CONFIG_H) $(SY
 ra-colorize.o : ra-colorize.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TM_P_H) \
     function.h $(REGS_H) hard-reg-set.h $(BASIC_BLOCK_H) df.h output.h ra.h
 ra-debug.o : ra-debug.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H)  insn-config.h \
-   $(RECOG_H) function.h hard-reg-set.h $(BASIC_BLOCK_H) df.h output.h ra.h
+   $(RECOG_H) function.h hard-reg-set.h $(BASIC_BLOCK_H) df.h output.h ra.h \
+   $(TM_P_H)
 ra-rewrite.o : ra-rewrite.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TM_P_H) \
    function.h $(REGS_H) hard-reg-set.h $(BASIC_BLOCK_H) df.h expr.h \
    output.h except.h ra.h reload.h insn-config.h
diff -rup orig/egcc-CVS20020730/gcc/ra-debug.c egcc-CVS20020730/gcc/ra-debug.c
--- orig/egcc-CVS20020730/gcc/ra-debug.c	2002-07-22 12:11:39.000000000 -0400
+++ egcc-CVS20020730/gcc/ra-debug.c	2002-07-31 14:52:41.943206387 -0400
@@ -29,6 +29,7 @@
 #include "df.h"
 #include "output.h"
 #include "ra.h"
+#include "tm_p.h"
 
 /* This file contains various dumping and debug functions for
    the graph coloring register allocator.  */
diff -rup orig/egcc-CVS20020730/gcc/ra-rewrite.c egcc-CVS20020730/gcc/ra-rewrite.c
--- orig/egcc-CVS20020730/gcc/ra-rewrite.c	2002-07-21 22:02:43.000000000 -0400
+++ egcc-CVS20020730/gcc/ra-rewrite.c	2002-07-31 14:34:44.447695450 -0400
@@ -57,7 +57,7 @@ static void delete_overlapping_slots PAR
 static int slot_member_p PARAMS ((struct rtx_list *, rtx));
 static void insert_stores PARAMS ((bitmap));
 static int spill_same_color_p PARAMS ((struct web *, struct web *));
-static int is_partly_live_1 PARAMS ((sbitmap, struct web *));
+static bool is_partly_live_1 PARAMS ((sbitmap, struct web *));
 static void update_spill_colors PARAMS ((HARD_REG_SET *, struct web *, int));
 static int spill_is_free PARAMS ((HARD_REG_SET *, struct web *));
 static void emit_loads PARAMS ((struct rewrite_info *, int, rtx));
@@ -770,7 +770,7 @@ spill_same_color_p (web1, web2)
 /* Given the set of live web IDs LIVE, returns nonzero, if any of WEBs
    subwebs (or WEB itself) is live.  */
 
-static int
+static bool
 is_partly_live_1 (live, web)
      sbitmap live;
      struct web *web;



More information about the Gcc-patches mailing list