www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 1388] New: multiple static constructors allowed in module

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1388

           Summary: multiple static constructors allowed in module
           Product: D
           Version: 1.007
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Keywords: accepts-invalid, spec
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: tomas famolsen.dk


module bad;

static this() {}
static this() {}

^^
The dmd frontend accepts this but generates two function declarations with the
same mangled name. Causes code generation error in gdc 0.23.

I could not find anywhere in the spec where it's specified whether multiple
module constructors are allowed, so I have marked this bug 'spec' as well.


-- 
Jul 30 2007
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1388






Same thing for destructors.


-- 
Jul 30 2007
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1388


bugzilla digitalmars.com changed:

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





Fixed dmd 1.021 and 2.004


-- 
Sep 28 2007