OSDN Git Service

New test case.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.old-deja / g++.ns / koenig5.C
1 // To find function pointers in Koenig lookup is ok as long as we only find one.
2 namespace A{
3   void foo();             // ERROR - 
4   struct X{};
5   void (*bar)(X*)=0;
6 }
7 using A::X;
8
9 void (*foo)(X*)=0;        // ERROR - 
10
11 void g()
12 {
13   foo(new X);            // ERROR - both objects and functions found
14   bar(new X);            // ok
15 }