https://issues.dlang.org/show_bug.cgi?id=21622
Issue ID: 21622
Summary: pragma(crt_constructor) accepts functions that return
non-POD types
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
Returning types with destructors or that require hidden pointers to the return
type is obviously going to fail, but is accepted by the compiler.
struct S { ~this(); }
extern (C)
pragma(crt_constructor) S foo() { return S(); } // should not compile
--