https://issues.dlang.org/show_bug.cgi?id=21623
Issue ID: 21623
Summary: pragma(crt_constructor) should accept function
declarations
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P1
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
Consider:
extern (C)
pragma(crt_constructor) void foo();
This code silently compiles, but does nothing, while:
extern (C)
pragma(crt_constructor) void foo() { }
compiles and calls foo() on startup.
There is no reason the former should not work, and to silently do nothing at
minimum is a bug.
--