This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/16190] make -Wnon-virtual-dtor more sophisticated
- From: "giovannibajo at libero dot it" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Jun 2004 15:37:23 -0000
- Subject: [Bug c++/16190] make -Wnon-virtual-dtor more sophisticated
- References: <20040625022626.16190.ncm-nospam@cantrip.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From giovannibajo at libero dot it 2004-06-26 15:37 -------
(In reply to comment #15)
> > Actually, it is necessary and sufficient to generate the warning
> > only for delete expressions or pseudo-destructror calls.
> Even then it could just as easily be a correct, non-polymorphic
> deletion, with no way to "fix" it short of patching the original
> header.
I know, but I think it is still valuable a warning for -Wall because it *does*
help many people. The few of us who can abuse C++ correctly at will can
specify -Wnon-virtual-dtor and be done with it.
I still think that following Gaby's suggestion so to improve the warning to
emit it on delete expressions is our best bet.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16190