[Issue 603] Undocumented behaviour: case and default create a scope

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Jan 27 05:48:51 PST 2007


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





------- Comment #5 from smjg at iname.com  2007-01-27 07:48 -------
(In reply to comment #3)
> We can say that switch do implicit goto, but spec say that useing goto for
> skiping initialisation is an error.

With that premise, the code would be invalid even if the default section
doesn't touch yuiop or asdfg.  It's still skipping initialisation even if what
hasn't been initialised is never used.  The variables are nonetheless in scope,
if you believe the spec rather than the compiler.


-- 



More information about the Digitalmars-d-bugs mailing list