[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: -Woverloaded-virtual
From: Stephan Kulow <coolo () itm ! mu-luebeck ! de>
Date: 1999-06-17 8:43:03
[Download RAW message or body]
Johannes Sixt wrote:
>
> On Wed, 16 Jun 1999, Stephan Kulow wrote:
> >I just discovered the joy of -Woverloaded-virtual. If you look at the
> >below
> >warnings, you can see that it really finds some real bugs (virtual
> >functions
> >that aren't called because the signature doesn't match):
> >
> >Now I'm asking if you think we should have this warnings on by default.
> >I'm asking and not doing it right away, as it also shows some warnings,
> >where this behaviour is intended:
>
> Please switch it on by default. Did you get warnings from third-party libraries
> like Qt or mico?
>
> >But I think, removing virtual from the derived class helps to supress
> >this
> >warning where it's not meant to be.
>
> First: This changes the semantics because the function from the derived class
> is no longer virtual (and, hence, can't be overriden in derived classes).
>
> Second: Bugs will be hard to find. In situations where the behavior is
> intended, the intent can be expressed much more clearly by naming the function
> in the derived class differently.
>
OK, if you say so.
Greetings, Stephan
--
As long as Linux remains a religion of freeware fanatics,
Microsoft have nothing to worry about.
By Michael Surkan, PC Week Online
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic