[Issue 11653] No error when forgetting break with range cases.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Dec 1 01:13:21 PST 2013


https://d.puremagic.com/issues/show_bug.cgi?id=11653


Kenji Hara <k.hara.pg at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |accepts-invalid, pull


--- Comment #1 from Kenji Hara <k.hara.pg at gmail.com> 2013-12-01 01:13:19 PST ---
(In reply to comment #0)
> void main()
> {
>   int test = 12412;
>   int output = 0;
>   switch(test)
>   {
>     case 1: case 100:
>       output = 1;
>       //break; //Oops..
>     case 101: .. case 255:
>       output = 2;
>       break;
>     default:
>       output = 3;
>   }
> }

The bug is that "switch case fallthrough" warning won't be reported even if
-w/wi switch is specified.

https://github.com/D-Programming-Language/dmd/pull/2905
https://github.com/D-Programming-Language/druntime/pull/680

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


More information about the Digitalmars-d-bugs mailing list