The member lookup problem in C++ is the problem of resolving a specifi
ed member name in the context of a, specified class, Member lookup in
C++ is complicated by the presence of virtual inheritance and multiple
inheritance, In this paper, me present an efficient algorithm for mem
ber lookup in C++. We also present a formalism for the multiple inheri
tance mechanism of G++, which ave use as the basis for deriving our al
gorithm, The formalism may also be of use as a formal basis for derivi
ng other C++ compiler algorithms.