summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/ext/ms-1.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/ext/ms-1.C')
-rw-r--r--gcc/testsuite/g++.dg/ext/ms-1.C17
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/ext/ms-1.C b/gcc/testsuite/g++.dg/ext/ms-1.C
new file mode 100644
index 000000000..3963b7561
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/ms-1.C
@@ -0,0 +1,17 @@
+
+// MS allows more things to be pointers to member functions
+// { dg-options "-fms-extensions" }
+
+struct X
+{
+ void Foo (X *);
+ void Bar ();
+};
+
+void Quux (void (X::*) ());
+
+void X::Foo (X *ptr) // { dg-message "candidate" }
+{
+ Quux (Foo); // { dg-error "no matches" }
+ Quux (Bar);
+}