OSDN Git Service

New test case.
authorloewis <loewis@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 14 Jul 1998 14:18:34 +0000 (14:18 +0000)
committerloewis <loewis@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 14 Jul 1998 14:18:34 +0000 (14:18 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@21140 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/g++.old-deja/g++.ns/koenig5.C [new file with mode: 0644]

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 (file)
index 0000000..e5500cb
--- /dev/null
@@ -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
+}