This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Patch installed for warnings
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sun, 2 Dec 2001 08:46:21 -0500 (EST)
- Subject: Patch installed for warnings
Fixed some warnings. Tested via three-stage on sparc-sun-solaris2.7
and installed as obvious.
--Kaveh
> cfgrtl.c:1947: warning: `blocks' might be used uninitialized in this function
> dwarf2out.c:4835: warning: function declaration isn't a prototype
> local-alloc.c:1351: warning: comparison of unsigned expression >= 0 is always true
> objc/objc-act.c:636: warning: comparison between signed and unsigned
2001-12-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* cfgrtl.c (purge_all_dead_edges): Initialize variable.
* dwarf2out.c (is_cxx): Prototype.
* local-alloc.c (block_alloc): Avoid 'unsigned>=0 is always true'
warning.
* objc/objc-act.c (defer_fn): Avoid signed/unsigned warning.
diff -rup orig/egcc-CVS20011201/gcc/cfgrtl.c egcc-CVS20011201/gcc/cfgrtl.c
--- orig/egcc-CVS20011201/gcc/cfgrtl.c Mon Nov 26 07:30:33 2001
+++ egcc-CVS20011201/gcc/cfgrtl.c Sat Dec 1 20:56:21 2001
@@ -1944,7 +1944,7 @@ purge_all_dead_edges (update_life_p)
int update_life_p;
{
int i, purged = false;
- sbitmap blocks;
+ sbitmap blocks = 0;
if (update_life_p)
{
diff -rup orig/egcc-CVS20011201/gcc/dwarf2out.c egcc-CVS20011201/gcc/dwarf2out.c
--- orig/egcc-CVS20011201/gcc/dwarf2out.c Fri Nov 30 16:30:32 2001
+++ egcc-CVS20011201/gcc/dwarf2out.c Sat Dec 1 20:57:56 2001
@@ -3459,6 +3459,7 @@ static unsigned get_AT_unsigned PARAMS
static inline dw_die_ref get_AT_ref PARAMS ((dw_die_ref,
enum dwarf_attribute));
static int is_c_family PARAMS ((void));
+static int is_cxx PARAMS ((void));
static int is_java PARAMS ((void));
static int is_fortran PARAMS ((void));
static void remove_AT PARAMS ((dw_die_ref,
diff -rup orig/egcc-CVS20011201/gcc/local-alloc.c egcc-CVS20011201/gcc/local-alloc.c
--- orig/egcc-CVS20011201/gcc/local-alloc.c Thu Nov 22 14:15:15 2001
+++ egcc-CVS20011201/gcc/local-alloc.c Sat Dec 1 21:03:07 2001
@@ -1347,8 +1347,8 @@ block_alloc (b)
if (hard_reg != NULL_RTX)
{
if (GET_CODE (hard_reg) == REG
- && REGNO (hard_reg) >= 0
- && REGNO (hard_reg) < FIRST_PSEUDO_REGISTER
+ && IN_RANGE (REGNO (hard_reg),
+ 0, FIRST_PSEUDO_REGISTER - 1)
&& ! call_used_regs[REGNO (hard_reg)])
continue;
}
diff -rup orig/egcc-CVS20011201/gcc/objc/objc-act.c egcc-CVS20011201/gcc/objc/objc-act.c
--- orig/egcc-CVS20011201/gcc/objc/objc-act.c Tue Nov 27 21:34:27 2001
+++ egcc-CVS20011201/gcc/objc/objc-act.c Sat Dec 1 21:09:13 2001
@@ -631,7 +631,7 @@ defer_fn (fn)
void
finish_file ()
{
- int i;
+ size_t i;
for (i = 0; i < VARRAY_ACTIVE_SIZE (deferred_fns); i++)
/* Don't output the same function twice. We may run into such