D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 16625 - [Reg 2.072] new and previously undeprecated switch case fallthrough error
Summary: [Reg 2.072] new and previously undeprecated switch case fallthrough error
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P1 regression
Assignee: No Owner
URL:
Keywords: pull
Depends on:
Blocks:
 
Reported: 2016-10-19 12:10 UTC by Martin Nowak
Modified: 2017-01-16 23:23 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Martin Nowak 2016-10-19 12:10:43 UTC
cat > bug.d << CODE
uint test(uint val)
{
    switch (val)
    {
    case 1: val <<= 1;
    default:
        return val;
    }
}
CODE

dmd -c bug
----
bug.d(6): Error: switch case fallthrough - use 'goto default;' if intended
----

Apparently this was a warning before but that doesn't warrant skipping the deprecation phase for new errors.
Comment 1 Martin Nowak 2016-10-19 15:54:22 UTC
https://github.com/dlang/dmd/pull/6206
Comment 2 github-bugzilla 2016-10-23 15:10:48 UTC
Commits pushed to stable at https://github.com/dlang/dmd

https://github.com/dlang/dmd/commit/d8075dc0581ae1da6e27762689a2d902f4c0947e
fix Issue 16625 - undeprecated switch fallthrough error

https://github.com/dlang/dmd/commit/2ef22724b26c36e10df6771f80ba7d16e4380fe0
Merge pull request #6206 from MartinNowak/fix16625

fix Issue 16625 - undeprecated switch fallthrough error
Comment 3 github-bugzilla 2016-11-05 03:41:35 UTC
Commits pushed to master at https://github.com/dlang/dmd

https://github.com/dlang/dmd/commit/d8075dc0581ae1da6e27762689a2d902f4c0947e
fix Issue 16625 - undeprecated switch fallthrough error

https://github.com/dlang/dmd/commit/2ef22724b26c36e10df6771f80ba7d16e4380fe0
Merge pull request #6206 from MartinNowak/fix16625
Comment 4 github-bugzilla 2016-12-27 14:40:44 UTC
Commits pushed to scope at https://github.com/dlang/dmd

https://github.com/dlang/dmd/commit/d8075dc0581ae1da6e27762689a2d902f4c0947e
fix Issue 16625 - undeprecated switch fallthrough error

https://github.com/dlang/dmd/commit/2ef22724b26c36e10df6771f80ba7d16e4380fe0
Merge pull request #6206 from MartinNowak/fix16625
Comment 5 github-bugzilla 2017-01-16 23:23:57 UTC
Commits pushed to newCTFE at https://github.com/dlang/dmd

https://github.com/dlang/dmd/commit/d8075dc0581ae1da6e27762689a2d902f4c0947e
fix Issue 16625 - undeprecated switch fallthrough error

https://github.com/dlang/dmd/commit/2ef22724b26c36e10df6771f80ba7d16e4380fe0
Merge pull request #6206 from MartinNowak/fix16625