www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 2382] New: spec is not clear on what is allowed as global/static initializers

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 digitalmars.com
        ReportedBy: tomas 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.


-- 
Oct 01 2008