[Issue 1181] New: DMD requires initializer for struct that shouldn't need one

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Apr 23 11:56:17 PDT 2007


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

           Summary: DMD requires initializer for struct that shouldn't need
                    one
           Product: D
           Version: 1.013
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: link-failure
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: sean at f4.ca


The presence of the "= void" in Wrap below should obviate the need for an
initializer.


C:\code\src\d\bugs>cat hdr.d
struct Data
{
    double val;
}

struct Wrap
{
    Data data = void;
}

C:\code\src\d\bugs>cat app.d
import hdr;

void main()
{
    Wrap w;
}

C:\code\src\d\bugs>dmd app
c:\bin\dmd\bin\..\..\dm\bin\link.exe app,,,user32+kernel32/noi+tango.lib;
OPTLINK (R) for Win32  Release 7.50B1
Copyright (C) Digital Mars 1989 - 2001  All Rights Reserved

app.obj(app)
 Error 42: Symbol Undefined _D3hdr4Wrap6__initZ
--- errorlevel 1

C:\code\src\d\bugs>


-- 



More information about the Digitalmars-d-bugs mailing list