https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102168
--- Comment #7 from Jonathan Wakely ---
Like I said, this warning should never be used :-)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102168
--- Comment #6 from Peter Dimov ---
Yes, I suppose you're right. The warning warns that Derived _can be_ deleted
via Base*, and that's correct - if not very useful in practice in this specific
case.
In fact the private destructor case is even l
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102168
--- Comment #5 from Jonathan Wakely ---
But isn't the whole point of the warning to flag that "it is possible but
unsafe to delete an instance of a derived class through a pointer to the class
itself or base class." If it isn't intended to be de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102168
--- Comment #4 from Peter Dimov ---
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
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102168
Jonathan Wakely changed:
What|Removed |Added
Blocks||81930
See Also|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102168
--- Comment #2 from Jonathan Wakely ---
The -Wnon-virtual-dtor warning is just dumb, that's why I added Clang's
-Wdelete-non-virtual-dtor which should be used instead.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102168
Peter Dimov changed:
What|Removed |Added
CC||pdimov at gmail dot com
--- Comment #1 fr