pragma(crt_constructor) should be improved to:
1. make the default linkage "C"
2. allow modification of immutable variables
Comment #1 by bugzilla — 2022-12-02T18:38:45Z
crt_destructor should also have C linkage.
crt_constructor should be marked @system because it can modify mutable variables.
Comment #2 by dlang-bot — 2022-12-02T19:56:05Z
@WalterBright created dlang/dmd pull request #14669 "fix Issue 23535 - extend pragma(crt_constructor) with semantics that …" fixing this issue:
- fix Issue 23535 - extend pragma(crt_constructor) with semantics that static constructors have
https://github.com/dlang/dmd/pull/14669
Comment #3 by robert.schadek — 2024-12-13T19:26:13Z