[Bug c++/102168] -Wnon-virtual-dtor shouldn't fire for protected dtor in a class with a friend declaration

pdimov at gmail dot com gcc-bugzilla@gcc.gnu.org
Mon Jun 6 12:42:59 GMT 2022


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

--- Comment #4 from Peter Dimov <pdimov at gmail dot com> ---
Warning on a private destructor + a friend declaration makes sense, because a
private destructor implies that the type is not intended to be derived from.
But warning on a protected destructor + a friend does not.


More information about the Gcc-bugs mailing list