gcc -Woverloaded-virtual

Thomas McGuire thomas.mcguire at gmx.net
Mon Nov 26 17:23:17 GMT 2007


Hello,

On Sunday 25 November 2007, Matthias Kretz wrote:
> On Saturday 24 November 2007, Thomas McGuire wrote:
> > I think we should remove this again. There are simply too many warnings,
> > as a result I can't see the other, more useful warnings anymore, they are
> > all in the middle of those virtual-overload warnings.
> > Additionally, most of the warnings are false positives (I checked a few
> > in KMail, and the ones I checked were all false, except one).
> > I doesn't help that the warnings are shown multiple times for the same
> > thing when the headers are included in more than one place.
>
> I would like to have the warning enabled by default so that I'm not the
> only one getting those. OTOH I fully understand that this can be very
> annoying when working on an application and you don't want to look into
> silencing the warnings (or fixing the bugs) in libs or whereever the header
> comes from.
It it not only the libs, it is also that some GCC warnings are unnecessary, 
see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20423 .

> So what do you think about having a switch to disable the warning - per
> default it would still be enabled? If the warning were disabled by default
> then we could just as well tell everybody to put -Woverloaded-virtual into
> his CXXFLAGS.
Yes, the flag would be a good idea (would be extra useful if somebody 
documents the flag on techbase somewhere). Then I also agree to have it 
enabled by default.

Regards,
Thomas






More information about the kde-core-devel mailing list