https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114357
Mathias Stearn <redbeard0531 at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |redbeard0531 at gmail dot com --- Comment #9 from Mathias Stearn <redbeard0531 at gmail dot com> --- For codebases that always use `quick_exit()` or `_Exit()` to exit, all static destructors are dead code bloat. For constinit function-statics with non-trivial destructors (that will never run) this results in unnecessary overhead each time the function is called: https://godbolt.org/z/jsjTYdMf3 > It changes behavior and even could cause memory leaks if abused. For static duration objects there is no such thing as a memory leak. The whole address space is going away. Allowing this on thread-local duration objects is probably a mistake though (with a possible exception for embedded and kernel-level code that does its own thread teardown).