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++/7302] -Wnon-virtual-dtor should't complain of protected dtor



------- Comment #9 from dee at pcds dot biz  2006-12-07 21:25 -------
I'd like to point out that structures containing only pure virtual functions
should not trigger this diagnostic either. Consider the following:

struct IfacFoo
{
   virtual int a() = 0;
   virtual int b() = 0;
};

There is no destructor declared nor do any members exist to necessitate the
implicit creation of one. As of version "4.1.1 20060525 (Red Hat 4.1.1-1)", the
diagnostic message is still emitted in both this case and those with a
protected "dummy" destructor included.


-- 

dee at pcds dot biz changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dee at pcds dot biz


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7302


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