Bug 21671 – Position of the `default` label in switch statement affects warnings

Status
NEW
Severity
enhancement
Priority
P4
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2021-03-01T21:45:00Z
Last change time
2024-12-13T19:14:56Z
Assigned to
No Owner
Creator
Andrei Alexandrescu
Moved to GitHub: dmd#18025 →

Comments

Comment #0 by andrei — 2021-03-01T21:45:00Z
Per https://github.com/s-ludwig/taggedalgebraic/pull/65, changing the position of `default` in a switch with no fallthrough affects eliminates a warning. That shouldn't be the case because the code is semantically equivalent regardless of the placement of the label.
Comment #1 by robert.schadek — 2024-12-13T19:14:56Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/18025 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB