digitalmars.D.bugs - [Issue 6067] New: switch case fall through crash
- d-bugmail puremagic.com (29/29) May 28 2011 http://d.puremagic.com/issues/show_bug.cgi?id=6067
- d-bugmail puremagic.com (11/11) May 28 2011 http://d.puremagic.com/issues/show_bug.cgi?id=6067
- d-bugmail puremagic.com (10/10) May 28 2011 http://d.puremagic.com/issues/show_bug.cgi?id=6067
- d-bugmail puremagic.com (12/12) May 28 2011 http://d.puremagic.com/issues/show_bug.cgi?id=6067
http://d.puremagic.com/issues/show_bug.cgi?id=6067
Summary: switch case fall through crash
Product: D
Version: D2
Platform: x86_64
OS/Version: Windows
Status: NEW
Severity: major
Priority: P2
Component: DMD
AssignedTo: nobody puremagic.com
ReportedBy: r.k.persson gmail.com
PDT ---
The following code crashes when run on dmd 2.053. windbg.exe stays on line
"nop3" when debugged and then the program crashes.
int main(string[] argv)
{
string a="test";
string b="dummy";
switch(b) {
case "nop1": a="apples";
case "nop2": a="oranges";
case "nop3": a="bananas";
}
return 0;
}
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 28 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6067
kennytm gmail.com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |kennytm gmail.com
Isn't it expected? A SwitchError will be thrown when there is no default: case
and the switch doesn't match.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 28 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6067
bearophile_hugs eml.cc changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bearophile_hugs eml.cc
I suggest to compile D code with the -w compiler switch.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 28 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6067
Robert Persson <r.k.persson gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |INVALID
PDT ---
Ah! My c++ damaged brain thought it would fall through, but this behaviour is
actually better!
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 28 2011









d-bugmail puremagic.com 