This is the mail archive of the gcc-patches@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]

Re: PATCH: Better -Woverloaded-virtual diagnostics


>>>>> Nathan Sidwell <nathan@acm.org> writes:

 > the current behaviour seems a little strange, and at variance with the
 > documentation. Indeed, when I investigated the code, I found that the
 > order of derived class member functions would affect whether you got a
 > warning or not - not good!

Agreed.

 > In this case I don't think it sensible to warn any way, because one
 > might well want to override a subset of virtual functions -- what one
 > doesn't want to do is introduce a new virtual function that looks
 > similar to a base virtual function.

I disagree.  That is also useful to check, but it is dangerous to override
some overloads and not others -- the ones that are not overridden will be
hidden, causing unexpected overload results.

Jason


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