This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[committed] Fix bootstrap for non-checking enabled
- From: Eric Christopher <echristo at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: nathan at codesourcery dot com
- Date: Thu, 09 Sep 2004 16:58:19 -0700
- Subject: [committed] Fix bootstrap for non-checking enabled
Quick obvious patch to fix unused variable warnings.
-eric
--
Eric Christopher <echristo@redhat.com>
2004-09-09 Eric Christopher <echristo@redhat.com>
* ra-colorize.c (reset_lists): Move variable declaration inside
ENABLE_CHECKING to avoid unused variable warnings when
not --enable-checking.
(check_colors): Ditto.
Index: ra-colorize.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ra-colorize.c,v
retrieving revision 1.22
diff -u -p -w -r1.22 ra-colorize.c
--- ra-colorize.c 9 Sep 2004 21:58:57 -0000 1.22
+++ ra-colorize.c 9 Sep 2004 23:56:47 -0000
@@ -210,7 +210,6 @@ void
reset_lists (void)
{
struct dlist *d;
- unsigned int i;
gcc_assert (!WEBS(SIMPLIFY));
gcc_assert (!WEBS(SIMPLIFY_SPILL));
@@ -249,6 +248,9 @@ reset_lists (void)
#ifdef ENABLE_CHECKING
/* Sanity check, that we only have free, initial or precolored webs.
*/
+ {
+ unsigned int i;
+
for (i = 0; i < num_webs; i++)
{
struct web *web = ID2WEB (i);
@@ -256,6 +258,7 @@ reset_lists (void)
gcc_assert (web->type == INITIAL || web->type == FREE
|| web->type == PRECOLORED);
}
+ }
#endif
free_dlist (&mv_worklist);
free_dlist (&mv_coalesced);
@@ -1973,7 +1976,7 @@ check_colors (void)
struct web *web = id2web[i];
struct web *aweb = alias (web);
struct conflict_link *wl;
- int nregs, c;
+ int nregs;
if (web->regno >= max_normal_pseudo)
continue;
@@ -1997,8 +2000,11 @@ check_colors (void)
#ifdef ENABLE_CHECKING
/* The color must be valid for the original usable_regs. */
+ {
+ int c;
for (c = 0; c < nregs; c++)
gcc_assert (TEST_HARD_REG_BIT (web->usable_regs, aweb->color + c));
+ }
#endif
/* Search the original (pre-coalesce) conflict list. In the
current
one some imprecise conflicts may be noted (due to combine() or