This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: [Bug c++/16190] make -Wnon-virtual-dtor more sophisticated
- From: Andrew Pinski <pinskia at physics dot uc dot edu>
- To: gcc-bugzilla at gcc dot gnu dot org
- Cc: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 25 Jun 2004 16:53:59 -0400 (EDT)
- Subject: Re: [Bug c++/16190] make -Wnon-virtual-dtor more sophisticated
>
>
> ------- Additional Comments From ncm at cantrip dot org 2004-06-25 19:46 -------
> > 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. That's why the warning belongs in -Weffc++: it's where
> we dump warnings that are about as likely to be spurious as not.
> I.e., even restricting the warnings to deletions would just cause
> frustration when the deletion occurs in a standard-library template
> instantiation.
>
> bangerth asked, "why -Weffc++ at all?" Because people insist on
> putting in warnings that trigger on perfectly good code, for what
> appear to be ideological reasons. If we can't keep them out of
> the compiler, at least we can stuff them someplace where they only
> needle people who like that sort of thing.
First I thought -Weffc++ warnings comes from a book and that is why
they are all together.
Second I would look into the history of the flag of -Wall and see
why this warning is there. Usually there is a reason why warnings
are here.
Andrew