[Issue 668] Use of *.di files breaks the order of static module construction

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Aug 6 16:14:59 PDT 2007


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


sean at f4.ca changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |




------- Comment #9 from sean at f4.ca  2007-08-06 18:14 -------
I don't think this issue is completely resolved.  The compiler now generates a
"static this() {}" in the .di file whenever it seems a static ctor in the
module.  However, the presence of a complete but empty static ctor seems to
convince the compiler that they are available, inlinable and empty.  In some
instances, this causes errors like:

"filename.di(0): variable SOME_VARIABLE missing initializer in static
constructor for const variable"

This is preventing the Tango user library from compiling properly on 1.019 and
above for Linux/MacOS.

The solution seems to be generating "static this();" rather than the complete
"static this() {}".


-- 



More information about the Digitalmars-d-bugs mailing list