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: "dee at pcds dot biz" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 Dec 2006 21:25:40 -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 #9 from dee at pcds dot biz 2006-12-07 21:25 -------
I'd like to point out that structures containing only pure virtual functions
should not trigger this diagnostic either. Consider the following:
struct IfacFoo
{
virtual int a() = 0;
virtual int b() = 0;
};
There is no destructor declared nor do any members exist to necessitate the
implicit creation of one. As of version "4.1.1 20060525 (Red Hat 4.1.1-1)", the
diagnostic message is still emitted in both this case and those with a
protected "dummy" destructor included.
--
dee at pcds dot biz changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dee at pcds dot biz
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7302