[Issue 6564] enum with no initializer compiles

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Jan 30 22:25:23 PST 2012


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



--- Comment #3 from yebblies <yebblies at gmail.com> 2012-01-31 17:25:22 EST ---
(In reply to comment #2)
> That's not generated by the compiler (at least not 2.057, I don't know about
> 2.058 HEAD).

It doesn't get generated by the compiler, but you can still do it.

> But how does it make sense to hide enum members anyway? 

An enum declaration creates its own type, so in the same kind of places you'd
want to pass around an opaque struct pointer.

> I've never seen D code that uses a forward enum declaration.

Neither have I, but I've seen plenty of C/C++ source that does it. eg dmd

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