https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102168
--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> --- 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 derived from, that's not a concern (there shouldn't be any derived classes). If it's intended to be derived from, then there could be derived classes, and so an instance of such a derived class could be deleted through a pointer to the base. So isn't this exactly the case that the warning wants to warn about? I'm not saying it's a good warning (I think it should never be used) but I don't see how "the class is intended to be a base class" would make it incorrect to warn about the possibility of deleting a derived class through a pointer to base.