Object lifetime is the entire point of C++ and it solves ~100% of the emergent flaws in C programs.
I was just dealing with this: https://bugs.gentoo.org/show_bug.cgi?id=974323.
Also std::start_lifetime_at is a hack and ive seen nobody using it in all the placed where it aught to be used.
If optimizing based on object lifetimes could be turned off, itd be turned off everywhere for hardening like strict aliasing is.
I was just dealing with this: https://bugs.gentoo.org/show_bug.cgi?id=974323.
Also std::start_lifetime_at is a hack and ive seen nobody using it in all the placed where it aught to be used.
If optimizing based on object lifetimes could be turned off, itd be turned off everywhere for hardening like strict aliasing is.