C++: simplify output from suggest_alternatives_for
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.ns / koenig5.C
blob4461d13dce2bb2706b155b57f3f96c40af14f8e0
1 // { dg-do assemble  }
2 // Function pointers are ignored in Koenig lookup. (DR 218)
3 namespace A{
4   void foo();             
5   struct X{};
6   void (*bar)(X*)=0;            // { dg-message "A::bar" }
8 using A::X;
10 void (*foo)(X*)=0;        
12 void g()
14   foo(new X);            // ok -- DR 218 says that we find the global
15                          // foo variable first, and therefore do not
16                          // perform argument-dependent lookup.
17   bar(new X);            // { dg-error "3:'bar' was not declared in this scope; did you mean 'A::bar'" }