This is the mail archive of the gcc-help@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]
Other format: [Raw text]

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


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