mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-02-05 14:59:45 +08:00
New test case.
From-SVN: r21140
This commit is contained in:
parent
2644deec19
commit
0650ddf440
15
gcc/testsuite/g++.old-deja/g++.ns/koenig5.C
Normal file
15
gcc/testsuite/g++.old-deja/g++.ns/koenig5.C
Normal file
@ -0,0 +1,15 @@
|
||||
// To find function pointers in Koenig lookup is ok as long as we only find one.
|
||||
namespace A{
|
||||
void foo(); // ERROR -
|
||||
struct X{};
|
||||
void (*bar)(X*)=0;
|
||||
}
|
||||
using A::X;
|
||||
|
||||
void (*foo)(X*)=0; // ERROR -
|
||||
|
||||
void g()
|
||||
{
|
||||
foo(new X); // ERROR - both objects and functions found
|
||||
bar(new X); // ok
|
||||
}
|
Loading…
Reference in New Issue
Block a user