This adds rudimentary lifetime tracking in C++ constexpr contexts,
allowing the compiler to report errors with using values after their
backing has gone out of scope. We don't yet handle other ways of ending
lifetimes (e.g. explicit destructor calls).
PR c++/70331
PR c++/96630
On Tue, Mar 28, 2023 at 10:32:28PM +1100, Nathaniel Shead via Gcc-patches wrote:
> * tree-core.h (struct tree_decl_common): New flag to check if
> value lifetime has expired.
> * tree.h (DECL_EXPIRED): Access the new flag.
> * print-tree.cc (print_node): Print the new flag
On Tue, Mar 28, 2023 at 10:50 PM Jakub Jelinek wrote:
>
> On Tue, Mar 28, 2023 at 10:32:28PM +1100, Nathaniel Shead via Gcc-patches
> wrote:
> > * tree-core.h (struct tree_decl_common): New flag to check if
> > value lifetime has expired.
> > * tree.h (DECL_EXPIRED): Access th