This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: warning not issued


> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]