This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: Better -Woverloaded-virtual diagnostics
- To: nathan at cs dot bris dot ac dot uk
- Subject: Re: PATCH: Better -Woverloaded-virtual diagnostics
- From: Jason Merrill <jason at cygnus dot com>
- Date: 19 Mar 1999 00:12:23 -0800
- Cc: egcs-patches at egcs dot cygnus dot com
- References: <36E4E98A.683E17DE@acm.org>
>>>>> 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