[Issue 14014] New: struct init required for zero initialized static arrays

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Tue Jan 20 01:07:30 PST 2015


https://issues.dlang.org/show_bug.cgi?id=14014

          Issue ID: 14014
           Summary: struct init required for zero initialized static
                    arrays
           Product: D
           Version: unspecified
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: DMD
          Assignee: nobody at puremagic.com
          Reporter: code at dawg.eu

cat > foo.di << CODE
struct Foo {}
CODE

cat > bug.d << CODE
import foo;

void main()
{
    Foo[2] foo;
}
CODE

dmd bug
----
bug.o:bug.d:function _Dmain: error: undefined reference to '_D3foo3Foo6__initZ'
----

This is a problem for header only libraries (and some modules in druntime).

--


More information about the Digitalmars-d-bugs mailing list