[Issue 2382] New: spec is not clear on what is allowed as global/static initializers
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Oct 1 16:48:23 PDT 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2382
Summary: spec is not clear on what is allowed as global/static
initializers
Product: D
Version: unspecified
Platform: PC
OS/Version: All
Status: NEW
Keywords: spec
Severity: normal
Priority: P2
Component: DMD
AssignedTo: bugzilla at digitalmars.com
ReportedBy: tomas at famolsen.dk
I can't find anywhere in the spec where it's clarified what can be used as a
global/static initializer (only some special cases, like static struct
initializers)
for example it's valid to initialize a global with the address of a function,
statically. however, for example, it's not allowed to cast this function
pointer to an integer even though there's no technical reason this should not
be allowed.
--
More information about the Digitalmars-d-bugs
mailing list