Patch: missing `break' in gcc.c

Tom Tromey tromey@cygnus.com
Mon Mar 27 11:00:00 GMT 2000


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;
  		}
  	    }
  	}


More information about the Gcc-patches mailing list