[Issue 6552] Wrong fallthrough warning for CaseRange

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Feb 17 17:43:37 PST 2013


http://d.puremagic.com/issues/show_bug.cgi?id=6552


Andrej Mitrovic <andrej.mitrovich at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|accepts-invalid,            |pull, rejects-valid
                   |diagnostic, spec            |


--- Comment #6 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2013-02-17 17:43:36 PST ---
(In reply to comment #5)
> The code is not valid per the current spec.
> 
> http://dlang.org/statement.html#SwitchStatement
> 
> CaseStatement:
>     case ArgumentList : ScopeStatementList
> 
> ScopeStatementList:
>     StatementListNoCaseNoDefault
> 
> StatementListNoCaseNoDefault:
>     StatementNoCaseNoDefault
>     StatementNoCaseNoDefault StatementListNoCaseNoDefault
> 
> By this spec,
>     case 1,2: case 3,4: anything
> is invalid.

I already said the spec was wrong and will have to be fixed. The OP code works
without -w, and we're not about to break a ton of code because the spec is
outdated (which is *very* common).

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list