This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/7302] -Wnon-virtual-dtor should't complain of protected dtor
- From: "pluto at agmk dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 Feb 2007 00:13:36 -0000
- Subject: [Bug c++/7302] -Wnon-virtual-dtor should't complain of protected dtor
- References: <bug-7302-1037@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #14 from pluto at agmk dot net 2007-02-22 00:13 -------
(In reply to comment #12)
> Already posted as <http://gcc.gnu.org/ml/gcc-patches/2006-04/msg00885.html>,
> with no response.
this patch doesn't cover one situation:
struct D;
struct C {
virtual void f() = 0;
protected: // or private
friend class D;
~C();
};
in such case compiler should generate warning, because class D
can delete derived object through the pointer to class C.
--
pluto at agmk dot net changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pluto at agmk dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7302