This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/16516] New: no warning of non-virtual dtor in subclass
- From: "naiman at math dot jct dot ac dot il" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Jul 2004 11:46:00 -0000
- Subject: [Bug c++/16516] New: no warning of non-virtual dtor in subclass
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Dear G++ Folk,
An astute student found the following example:
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
class foo1 {
public:
virtual void f1 (void) {}
virtual ~foo1 (void);
};
class foo2 : public foo1 {
public:
~foo2 (void);
};
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
We believe the compiler should at least warn that foo2
has a virtual function, and non-virtual dtor.
Thank you for your time!
ATB,
Aaron Naiman
--
Aaron ("Aharon") Naiman | Jerusalem College of Technology--Machon Lev
naiman@math.jct.ac.il | http://math.jct.ac.il/~naiman
--
Summary: no warning of non-virtual dtor in subclass
Product: gcc
Version: 3.2
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: naiman at math dot jct dot ac dot il
CC: gcc-bugs at gcc dot gnu dot org,naiman at math dot jct
dot ac dot il
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16516