[Bug c++/16514] New: no warning of non-virtual dtor in subclass
naiman at math dot jct dot ac dot il
gcc-bugzilla@gcc.gnu.org
Tue Jul 13 10:20:00 GMT 2004
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=16514
More information about the Gcc-bugs
mailing list