← Back to index
|
Original Bugzilla link
Bug 11653 – No error when forgetting break with range cases.
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-11-30T09:05:15Z
Last change time
2022-04-09T16:29:43Z
Keywords
accepts-invalid, pull
Assigned to
No Owner
Creator
Shammah Chancellor
See also
https://issues.dlang.org/show_bug.cgi?id=22999
Comments
Comment #0
by shammah.chancellor — 2013-11-30T09:05:15Z
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; } }
Comment #1
by k.hara.pg — 2013-12-01T01:13:19Z
(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
Comment #2
by github-bugzilla — 2013-12-01T01:43:00Z
Commits pushed to master at
https://github.com/D-Programming-Language/druntime
https://github.com/D-Programming-Language/druntime/commit/16be7e673385baf291c9bc025a7987173c29ea7c
fix Issue 11653 - No error when forgetting break with range cases.
https://github.com/D-Programming-Language/druntime/commit/8cfd7f5d11953270ea11be304d0ca22c94d2bb0e
Merge pull request #680 from 9rnsr/fix11653 Issue 11653 - No error when forgetting break with range cases.
Comment #3
by github-bugzilla — 2013-12-01T14:54:30Z
Commits pushed to master at
https://github.com/D-Programming-Language/dmd
https://github.com/D-Programming-Language/dmd/commit/a8052199ad96ae791e4964213178a76d111de50d
fix Issue 11653 - No error when forgetting break with range cases.
https://github.com/D-Programming-Language/dmd/commit/c8773c166b7a131aba9c4a2656dd20a3d4a170ac
Merge pull request #2905 from 9rnsr/fix11653 Issue 11653 - No error when forgetting break with range cases
Comment #4
by r.sagitario — 2013-12-15T06:01:56Z
*** Issue 9642 has been marked as a duplicate of this issue. ***