Switch case falltrhough, regression or intended behavior ?
Jonathan M Davis
jmdavisProg at gmx.com
Sun Feb 17 13:46:05 PST 2013
On Sunday, February 17, 2013 16:08:13 Nick Sabalausky wrote:
> On Sun, 17 Feb 2013 22:03:33 +0100
>
> Andrej Mitrovic <andrej.mitrovich at gmail.com> wrote:
> > On 2/17/13, deadalnix <deadalnix at gmail.com> wrote:
> > > It used to work.
> >
> > Are you sure it's a regression?
> >
> > 2.062:
> > $ dmd test.d
> >
> >
> > $ dmd -w test.d
> >
> > > test.d(8): Error: switch case fallthrough - use 'goto case;' if
> > > intended test.d(10): Error: switch case fallthrough - use 'goto
> > > default;' if intended
> >
> > I've tested from 2.062 to 2.057 and they all have this behavior.
>
> Hmm, that brings up a different (though minor) issue: If it's a
> warning, why does it say "Error"?
Probably because -w turns warnings into errors. That's its whole schtick.
However, -wi also appears to say "Error," which definitely isn't correct.
- Jonathan M Davis
More information about the Digitalmars-d
mailing list