[Bug c++/16190] make -Wnon-virtual-dtor more sophisticated

giovannibajo at libero dot it gcc-bugzilla@gcc.gnu.org
Sat Jun 26 15:46:00 GMT 2004


------- 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



More information about the Gcc-bugs mailing list