diff options
author | Martin v. Löwis <loewis@gcc.gnu.org> | 1998-07-14 14:18:34 +0000 |
---|---|---|
committer | Martin v. Löwis <loewis@gcc.gnu.org> | 1998-07-14 14:18:34 +0000 |
commit | 0650ddf440548e1015b92504a9e9f922b279c769 (patch) | |
tree | 058cd647b836e8618d15932b12d6afbe242be16c /gcc | |
parent | 2644deec19160daf6c610c037c9f675af5e63461 (diff) | |
download | gcc-0650ddf440548e1015b92504a9e9f922b279c769.zip gcc-0650ddf440548e1015b92504a9e9f922b279c769.tar.gz gcc-0650ddf440548e1015b92504a9e9f922b279c769.tar.bz2 |
New test case.
From-SVN: r21140
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.ns/koenig5.C | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.ns/koenig5.C b/gcc/testsuite/g++.old-deja/g++.ns/koenig5.C new file mode 100644 index 0000000..e5500cb --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.ns/koenig5.C @@ -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 +} |