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 bangerth at dealii dot org  2004-06-25 18:56 -------
> The move cannot break normal Makefiles, because no  
> new warnings would be issued for code that previously evoked no warnings. 
 
Well, it does. Because people who _do_ want to have the warning need to 
add it to their makefiles now. The idea of moving a warning temporarily 
into -Weff-c++ and back later certainly lacks all characteristics of good 
software engineering, user friendliness, and longterm maintainability. 
 
Besides: why -Weff-c++ at all? 
 
 
> Anyone specificially asking for nanny-ish advice can still get it via  
> an appropriate "nanny-ish-advice-please" option. 
 
The same can be said for people who do not wish this option. I maintain my 
position that they are in the minority to those who _do_ want the option. 
 
 
> You probably don't  
> know that there is a separate option to turn it off.  Instead, you  
> start avoiding "-Wall".  Even if it is made more specific, such as to  
> be triggered only by "new" of a derived class that also doesn't declare  
> a virtual destructor, it's still far from clear that it belongs in  
> "-Wall". 
 
-Wall means "all warnings", that's why that name was chosen. Now, it is true 
that it does _not_ include all warnings, but that's something that one may 
argue about as well. As to avoiding -Wall altogether: we can't really do much 
about people who do not want to look at the manual, which lists that this 
particular warning is part of -Wall, and also how to switch off particular 
warnings. I do see the value in improving the detection of cases in which 
this warning triggers, but I do not see why it should be so hard to  
selectively disable this warning if you really don't like it and why the 
solution should be to move flags around. 
 
W. 

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|spurious warning about non- |make -Wnon-virtual-dtor more
                   |virtual destructor          |sophisticated


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]