Something weird with cp/decl.c switch statement

Andrew Pinski pinskia@gmail.com
Tue Jun 5 15:23:00 GMT 2007


On 6/5/07, Aaron Gray <angray@beeb.net> wrote:
> There is something weird with the switch statement in cp/decl.c:7105.
> I dont think it will effect the decl.c's logic, but what does it say about
> the GCC's C parser, is this legal C ?

Yes this is legal C :).
Just for everyone else the code looks like:
switch( a)
{
  case b:
  {
    ...
    break
    case c:
     .....
  }
}

case are just special kind of labels.

-- Pinski



More information about the Gcc mailing list