http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49867

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-07-27 
13:03:35 UTC ---
void
foo ()
{
  switch (3)
    {
      struct S
      {
        void bar ()
        {
          case 3: break;
        }
      };
    }
}

doesn't ICE, but is accepted while IMHO it should not.  Or
void
baz ()
{
  while (1)
    {
      struct S
      {
        void bar ()
        {
          continue;
        }
      };
    }
}

I guess we should save/clear and restore
parser->in_statement and parser->in_switch_statement_p around parsing of the
nested functions (or already the types?) and lambda bodies (or whole lambdas?).

Reply via email to