This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/11157] New: Annoying warning message


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]