http://llvm.org/bugs/show_bug.cgi?id=22039

            Bug ID: 22039
           Summary: clang accepts ambiguous function name lookup when
                    using operator()
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified

clang accepts this code:
#include <iostream>                                                             

struct A {                                                                      
  void operator()(int) {                                                        
    std::cout << "A::f\n";                                                      
  }                                                                             
};                                                                              

struct B {                                                                      
  void operator()() {                                                           
    std::cout << "B::f\n";                                                      
  }                                                                             
};                                                                              

struct C                                                                        
  : A, B                                                                        
{                                                                               
};                                                                              

int main() {                                                                    
  C c;                                                                          
  c();                                                                          
  return 0;                                                                     
} 

which should give an ambiguous name lookup error. Both gcc and intel's compiler
correctly give the operator() is ambiguous error

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to