This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: multiple inheritance abiguity
- From: John Love-Jensen <eljay at adobe dot com>
- To: Rich Johnson <rjohnson at dogstar-interactive dot com>
- Cc: MSX to GCC <gcc-help at gcc dot gnu dot org>
- Date: Fri, 20 Jan 2006 07:24:29 -0600
- Subject: Re: multiple inheritance abiguity
Hi Rich,
> I wouldn't mind an info or warning message. Sure it'd be annoying,
> but action could be deferred to deal with more pressing issues.
> Leave the errors to truly ambiguous cases.
The case you pointed out is a truly ambiguous case.
You, the programmer, can disambiguate it by explicitly designating what you
want the child class to do.
> Kinda blows apart the whole concept of public inheritance, doesn't it?
No. It protects the developer from unexpected behavior and surprises.
As a developer, I'd be highly upset if the introduction of a new base class
all of a sudden silently changed the behavior of the class in use because
two symbols happened to collide and then the compiler decided on its own
that the other symbol was a better signature match.
Sincerely,
--Eljay