Hi, Consider the code struct A{ void fn(){cout << "1";} }; template<class T> struct B{ void fn(){cout << "2";} }; template<class T> struct C : A, B<T>{ C(){ fn(); } // fn is a non dependent name. }; int main(){ C<int> c; } In this case, it looks fairly intuitive that the call to 'fn' is ambiguous. However there are two things that I am not able to resolve a) I cannot find anything in the Standard that talk about such a scenario. Going by the rules of non dependent names (bound in lookup phase 1), fn should be in fact bound to A::fn. b) Comeau online compiler accepts this code and compiles it fine. So, I want to confirm if gcc 4.1.1 behavior is right? Any relevant quotes from the Standard will also help. Regards, Anubhav.
*** This bug has been marked as a duplicate of 15272 ***