This is the mail archive of the
mailing list for the GCC project.
Re: Multiple inheritance bug (ICE 980715)
> What is `Koenig lookup'?
If you have a function call where the function name is unqualified,
the compiler computes 'candidate functions' for foo at some point, and
then uses 'overload resolution' to select one. The candidate functions
are not only those versions of foo that are visible - the compiler
shall also investigate whether x, y, or z have parameter types defined
in a namespace. Given
foo(X, int, int);
the compiler will call MyStuff::foo, even though it is not visible
Andrew Koenig came up with that idea, so the colloquial name of the
algorithm is 'Koenig lookup'. The formal name is "argument type
The algorithm is straight-forward as long as x,y,z have simple or
class types. If they have function types, things get tricky. The
compiler was confused to found that the argument could be both a
function and an integer. As I said, I believe this is illegal.