These functions cannot have parameters, because they are called by the runtime which has no way to give a parameter. But the error is not diagnosed:
extern (C)
pragma(crt_constructor) void foo(int i) { } // has parameter
struct S {
extern (C)
pragma(crt_constructor) void bar() { } // has `this`
}
Probably pragma(crt_destructor) has the same problem.
Comment #1 by robert.schadek — 2024-12-13T19:14:33Z