https://gcc.gnu.org/bugzilla/show_bug.cgi?id=129139

Peter Shen <Pure-Happiness at outlook dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |Pure-Happiness at outlook dot 
com

--- Comment #2 from Peter Shen <Pure-Happiness at outlook dot com> ---
(In reply to Drea Pinski from comment #1)
> This feels like undefined behavior.

I don't think the code contains undefined behavior according to the current C++
standard. The normal destruction process automatically invokes the destructors
of base and member subobjects. If calling the destructor on the base subobject
ends the lifetime of the complete object, then the normal destruction is also
undefined behavior!

Reply via email to