[Issue 3820] Small hole in switch semantics
https://issues.dlang.org/show_bug.cgi?id=3820 Martin Krejcirikchanged: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |DUPLICATE --- Comment #8 from Martin Krejcirik --- *** This issue has been marked as a duplicate of issue 14532 *** --
[Issue 3820] Small hole in switch semantics
https://issues.dlang.org/show_bug.cgi?id=3820 Andrei Alexandrescu and...@erdani.com changed: What|Removed |Added Version|unspecified |D2 --
[Issue 3820] Small hole in switch semantics
http://d.puremagic.com/issues/show_bug.cgi?id=3820 --- Comment #7 from Martin Nowak c...@dawg.eu 2013-05-20 03:20:58 PDT --- IIRC this switch is implemented as below. Unless we expect the block to always run, as in comment 3, it's difficult to fix. int foo(int a) { switch (var) { int res; case 1: res = 1; return res; default: return res; } } int foo(int a) { if (var == 1) goto L1; else goto Ldefault; int res; L1: res = 1; return res; Ldefault: return res; } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 3820] Small hole in switch semantics
http://d.puremagic.com/issues/show_bug.cgi?id=3820 Maxim Fomin ma...@maxim-fomin.ru changed: What|Removed |Added CC||ma...@maxim-fomin.ru --- Comment #6 from Maxim Fomin ma...@maxim-fomin.ru 2013-05-19 21:09:14 PDT --- *** Issue 10121 has been marked as a duplicate of this issue. *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 3820] Small hole in switch semantics
http://d.puremagic.com/issues/show_bug.cgi?id=3820 d...@dawgfoto.de changed: What|Removed |Added CC||d...@dawgfoto.de --- Comment #4 from d...@dawgfoto.de 2012-03-12 07:24:29 PDT --- *** Issue 7630 has been marked as a duplicate of this issue. *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 3820] Small hole in switch semantics
http://d.puremagic.com/issues/show_bug.cgi?id=3820 --- Comment #5 from d...@dawgfoto.de 2012-03-12 07:37:28 PDT --- You can only execute that block with a goto or a loop. The initialization should happen anyhow. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 3820] Small hole in switch semantics
http://d.puremagic.com/issues/show_bug.cgi?id=3820 --- Comment #3 from bearophile_h...@eml.cc 2012-03-11 14:14:59 PDT --- A probably related case: import std.stdio; enum Foo { A } void main() { Foo f = Foo.A; switch (f) { writeln(f); case Foo.A: break; } } With DMD 2.059head it prints nothing. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 3820] Small hole in switch semantics
http://d.puremagic.com/issues/show_bug.cgi?id=3820 bearophile_h...@eml.cc changed: What|Removed |Added CC||andrej.mitrov...@gmail.com --- Comment #2 from bearophile_h...@eml.cc 2011-05-12 15:33:44 PDT --- *** Issue 5989 has been marked as a duplicate of this issue. *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---