[RFC] libstdc++: optional: Set _M_engaged after the call to destructor [PR127005]

Ville Voutilainen ville.voutilainen@gmail.com
Sun Aug 23 19:40:27 GMT 2026


On Sun, 23 Aug 2026 at 22:38, Ville Voutilainen
<ville.voutilainen@gmail.com> wrote:
>
> On Sun, 23 Aug 2026 at 22:26, Andrea Pinski
> <andrew.pinski@oss.qualcomm.com> wrote:
> >
> > Sometimes the destructor will cause the optimizers not to see that
> > _M_engaged has been to set to false (e.g. an external call). This
> > means that we might get an uninitialized warning after the destructor
> > in some cases.
>
> Can you elaborate on what kind of an uninitialized warning that is,
> and what code triggers it?

Never mind, I read the PR, that explains it.


More information about the Libstdc++ mailing list