warning not issued

Martin von Loewis martin@mira.isdn.cs.tu-berlin.de
Thu Oct 22 18:00:00 GMT 1998


> This is not legal C++; you can't jump around an initializer with a
> goto or a switch unless the initializer is inside curly braces.
> Just the same, the compiler should have caught it ... I'm sure this
> was missed because most folks don't use goto.

I think this is exactly the complaint. The compiler does catch cases
like

struct X{
  X();
};


main()
{
  goto a;
  X x;
  a: X y;
}

Bug reports should go to egcs-bugs@cygnus.com, though.

Regards,
Martin



More information about the Gcc mailing list