[Bug c++/11157] New: Annoying warning message
emild@collectivestudios.com
gcc-bugzilla@gcc.gnu.org
Wed Jun 11 18:38:00 GMT 2003
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
More information about the Gcc-bugs
mailing list