This is the mail archive of the
mailing list for the GCC project.
Re: switch question in recog.c
On Tue, Oct 07, 2003 at 03:15:49PM -0400, Andrew MacLeod wrote:
> On Tue, 2003-10-07 at 14:59, Daniel Jacobowitz wrote:
> > > Look at where the case 'r' is.. its inside the 'default:' case. Is that
> > > really kosher?
> > Yep. It acts basically as a label, they're only scoped by additional
> > switch statements. At least that's my reading of the standard.
> Huh. I would have failed that question miserably after using the
> language for 20 years.
Unfortunately, C doesn't have a high-level switch statement, just a
prettified computed goto. There's an argument for warning about
code like this.