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

--- Comment #6 from Marc Glisse <glisse at gcc dot gnu.org> ---
(In reply to Jonathan Wakely from comment #4)
> It might be valid with a custom deleter, but the example shown has undefined
> behaviour.

When the derived class does not add any member or redefine any important
functionality, it is not an uncommon technique to call the base class
destructor on a derived class. It might pedantically be illegal, but it is
useful, and I believe some people would like to avoid the warning when the two
destructors are equivalent.

Reply via email to