------- Comment #3 from joseph at codesourcery dot com 2010-06-29 16:46 ------- Subject: Re: Break in increment expression of "for" statement inconsistent with g++
On Tue, 29 Jun 2010, pinskia at gmail dot com wrote: > What does a break with a statement expression do for each frontend? Is > it even valid to have a break there(without a statement expression)? The relevant contexts have expressions, so without statement expressions it's not possible to have break there. The C standard (I haven't checked C++) requires break (and continue, which probably has much the same issue) to be in a loop or switch body - but being elsewhere in the loop than its body isn't possible in standard C anyway. When I was fixing statement expression issues with jumps, and defining exactly what was permitted (bug 772), I didn't think of this particular issue. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44715