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]

Typo in genrecog.c


Hello,

I found a typo in genrecog.c with the aid of my bounds-checking code.
The patch to correct this is below.

	Herman.

1999-31-30 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>

	* genrecog.c (change_state) Corrected typo.

--- genrecog.c.org	Thu Dec 30 12:45:39 1999
+++ genrecog.c	Thu Dec 30 12:45:44 1999
@@ -1597,7 +1597,7 @@ change_state (oldpos, newpos, afterward,
   for (old_has_insn = odepth - 1; old_has_insn >= 0; --old_has_insn)
     if (oldpos[old_has_insn] >= 'A' && oldpos[old_has_insn] <= 'Z')
       break;
-  for (new_has_insn = odepth - 1; new_has_insn >= 0; --new_has_insn)
+  for (new_has_insn = ndepth - 1; new_has_insn >= 0; --new_has_insn)
     if (newpos[new_has_insn] >= 'A' && newpos[new_has_insn] <= 'Z')
       break;
 


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