[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Bug c++/7302] -Wnon-virtual-dtor should't complain of protected dtor


--- Comment #26 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-06-02 21:29:53 UTC ---
(can this bug be un-ASSIGNED?)

(In reply to comment #25)
> Here, H must have a virtual destructor. The point where it can know it should
> warn is the "delete this;" line.

I've posted a patch to http://gcc.gnu.org/ml/gcc-patches/2011-06/msg00191.html
which gives this for the code in comment 25

7302.cc:16:12: warning: deleting object of abstract class type ‘H’ which has
non-virtual destructor will cause undefined behaviour

Configure bugmail: http://gcc.gnu.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

Reply to: