This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/11157] New: Annoying warning message
- From: "emild at collectivestudios dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 Jun 2003 18:38:25 -0000
- Subject: [Bug c++/11157] New: Annoying warning message
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11157
Summary: Annoying warning message
Product: gcc
Version: 3.2.3
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: emild@collectivestudios.com
CC: gcc-bugs@gcc.gnu.org
The following example produces this inappropriate warning:
warning: `class Base' has virtual functions but non-virtual
destructor
The example:
class Base
{
protected:
~Base() {}
virtual void foo()=0;
};
Since the destructor is protected, it is OK for it not to be public. In fact,
it is a clear indication of the indended use of the base class.
Thanks,
Emil