https://gcc.gnu.org/bugzilla/show_bug.cgi?id=22395
--- Comment #9 from Jonathan Wakely ---
(In reply to marc from comment #8)
> I don't think Effective C++ is the benchmark any more
I've been trying to say that for years and people keep insisting they want
warnings based on advice from the late
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=22395
--- Comment #8 from marc at kdab dot com ---
I don't think Effective C++ is the benchmark any more, so water under bridges
that have already burned, but fwiw: contrary to C.127 these days, I learned
this rule as "A base class's destructor should
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=22395
--- Comment #7 from Jonathan Wakely ---
(In reply to Eric Gallager from comment #6)
> Note that clang goes even farther in splitting up -Wdelete-non-virtual-dtor
> into different warnings based on whether the dtor is abstract or not:
>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=22395
--- Comment #6 from Eric Gallager ---
(In reply to Jonathan Wakely from comment #5)
> private inheritance doesn't mean the destructor can't be called with the
> wrong static type
>
> class Foo {
> public:
> ~Foo() {}
> virtual void f()
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22395
--- Comment #5 from Jonathan Wakely redi at gcc dot gnu.org 2012-01-05
17:13:02 UTC ---
private inheritance doesn't mean the destructor can't be called with the wrong
static type
class Foo {
public:
~Foo() {}
virtual void f() { }
};
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-07-11
16:29 ---
Confirmed.
--
What|Removed |Added
Severity|normal
--- Additional Comments From mutz at kde dot org 2005-07-10 18:54 ---
class Bar : public Foo {};
Of course, that should read:
class Bar : private Foo {};
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22395
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-07-10
19:05 ---
I think this is a dup of bug 16168 or at least a related issue.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22395
--- Additional Comments From mutz at kde dot org 2005-07-10 19:16 ---
Related it may be, but different it is. bug 16168 is about subclasses that
don't have virtual methods, but even in the case of the private inheritance
from a base class having virtual methods, the warning should not