[Bug c++/22395] -Weffc++ shouldn't warn about non-virtual dtor of private subclasses

2019-11-22 Thread redi at gcc dot gnu.org
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

[Bug c++/22395] -Weffc++ shouldn't warn about non-virtual dtor of private subclasses

2019-11-22 Thread marc at kdab dot com
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

[Bug c++/22395] -Weffc++ shouldn't warn about non-virtual dtor of private subclasses

2019-11-22 Thread redi at gcc dot gnu.org
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: >

[Bug c++/22395] -Weffc++ shouldn't warn about non-virtual dtor of private subclasses

2019-11-21 Thread egallager at gcc dot gnu.org
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()

[Bug c++/22395] -Weffc++ shouldn't warn about non-virtual dtor of private subclasses

2012-01-05 Thread redi at gcc dot gnu.org
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() { } };

[Bug c++/22395] -Weffc++ shouldn't warn about non-virtual dtor of private subclasses

2005-07-11 Thread pinskia at gcc dot gnu dot org
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-07-11 16:29 --- Confirmed. -- What|Removed |Added Severity|normal

[Bug c++/22395] -Weffc++ shouldn't warn about non-virtual dtor of private subclasses

2005-07-10 Thread mutz at kde dot org
--- 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

[Bug c++/22395] -Weffc++ shouldn't warn about non-virtual dtor of private subclasses

2005-07-10 Thread pinskia at gcc dot gnu dot org
--- 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

[Bug c++/22395] -Weffc++ shouldn't warn about non-virtual dtor of private subclasses

2005-07-10 Thread mutz at kde dot org
--- 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