This is the mail archive of the gcc-bugs@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]
Other format: [Raw text]

Re: [Bug c/23895] switch and struct


pinskia at gcc dot gnu dot org wrote:-

> 
> ------- Additional Comments From pinskia at gcc dot gnu dot org  2005-09-15 14:22 -------
> Small testcase:
> void f(int i)
> {
>   switch (i)
>   {
>      case 1:
>       struct a *b;
>   }
> }
> 
> But IIRC this is invalid code as variable defintions are not allowed right after a label.
> void f(int i)
> {
> a:
>   struct a *b;
> }
> 
> 
> In fact This is a dup of bug 7508.

Really this error message needs to be much better.  Otherwise this
PR will keep coming back.

Neil.


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