This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Patch: missing `break' in gcc.c
- To: Gcc Patch List <gcc-patches at gcc dot gnu dot org>
- Subject: Patch: missing `break' in gcc.c
- From: Tom Tromey <tromey at cygnus dot com>
- Date: 27 Mar 2000 12:01:39 -0700
- Reply-To: tromey at cygnus dot com
I believe there is a missing `break' in handle_braces() in gcc.c.
Without this patch, `i' will always be `n_switches' after the loop
finishes. I think this will result in an incorrect call to
give_switch().
I found this by inspection. I don't have a test case.
2000-03-27 Tom Tromey <tromey@cygnus.com>
* gcc.c (handle_braces): In {x*...} case, break out of loop if
switch is found.
Tom
Index: gcc.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/gcc.c,v
retrieving revision 1.135
diff -c -r1.135 gcc.c
*** gcc.c 2000/03/26 23:23:01 1.135
--- gcc.c 2000/03/27 18:57:49
***************
*** 4778,4783 ****
--- 4778,4784 ----
&& check_live_switch (i, hard_match_len))
{
present = 1;
+ break;
}
}
}