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++/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.

I didn't propose moving it to -Weffc++ and back.  Moving it back to 
-Wall would have to be somebody else's proposal, and would need to be
argued on its own merits.  Such a move would encounter strong and
justified resistance.  To expect such resistance in the future is
to admit that the warning doesn't belong in -Wall now.

-- 


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


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