[Issue 4158] switch segfault

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue May 4 23:44:23 PDT 2010


http://d.puremagic.com/issues/show_bug.cgi?id=4158


Walter Bright <bugzilla at digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla at digitalmars.com
         Resolution|                            |INVALID


--- Comment #1 from Walter Bright <bugzilla at digitalmars.com> 2010-05-04 23:44:21 PDT ---
It doesn't actually segfault, it executes a HALT instruction. If there is no
default in a switch, the compiler inserts one of the form:

  default: HALT

The idea is that the default should not be implied as fall-through, which it
does in C.

D is behaving as it is designed to.

-- 
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