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]
Other format: [Raw text]

PATCH COMMITTED: fix declaration after statement in reload1.c


The recent patch to verify_initial_elim_offsets in reload1.c put a
declaration after a statement, which is OK in C99 but not in C90.  I
committed the appended patch as obvious.

Ian


2005-05-26  Ian Lance Taylor  <ian@airs.com>

        * reload1.c (verify_initial_elim_offsets): Add braces to avoid
        having a declaration after a statement.


Index: reload1.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/reload1.c,v
retrieving revision 1.470
diff -u -p -r1.470 reload1.c
--- reload1.c	25 May 2005 20:19:17 -0000	1.470
+++ reload1.c	26 May 2005 05:42:02 -0000
@@ -3315,14 +3315,16 @@ verify_initial_elim_offsets (void)
     return true;
 
 #ifdef ELIMINABLE_REGS
-  struct elim_table *ep;
+  {
+   struct elim_table *ep;
 
-  for (ep = reg_eliminate; ep < &reg_eliminate[NUM_ELIMINABLE_REGS]; ep++)
-    {
-      INITIAL_ELIMINATION_OFFSET (ep->from, ep->to, t);
-      if (t != ep->initial_offset)
-	return false;
-    }
+   for (ep = reg_eliminate; ep < &reg_eliminate[NUM_ELIMINABLE_REGS]; ep++)
+     {
+       INITIAL_ELIMINATION_OFFSET (ep->from, ep->to, t);
+       if (t != ep->initial_offset)
+	 return false;
+     }
+  }
 #else
   INITIAL_FRAME_POINTER_OFFSET (t);
   if (t != reg_eliminate[0].initial_offset)


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