Bug 21404 – Case where dmd emits twice a warning about non-reachable statement

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2020-11-18T23:54:47Z
Last change time
2024-12-13T19:12:55Z
Keywords
diagnostic
Assigned to
No Owner
Creator
basile-z
See also
https://issues.dlang.org/show_bug.cgi?id=21389
Moved to GitHub: dmd#18000 →

Comments

Comment #0 by b2.temp — 2020-11-18T23:54:47Z
For the following code, compield with -w --- module double_warn; enum E {e} void main() { E e; final switch (e) case E.e: { assert(false); break; } } --- The compiler warns: > double_warn.d(12): Warning: statement is not reachable > double_warn.d(12): Warning: statement is not reachable There should be only one.
Comment #1 by robert.schadek — 2024-12-13T19:12:55Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/18000 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB