[Issue 3820] Small hole in switch semantics
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon May 20 03:21:01 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=3820
--- Comment #7 from Martin Nowak <code at 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: -------
More information about the Digitalmars-d-bugs
mailing list