aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/obj-c++.dg/method-5.mm
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/obj-c++.dg/method-5.mm')
-rw-r--r--gcc-4.9/gcc/testsuite/obj-c++.dg/method-5.mm30
1 files changed, 30 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/obj-c++.dg/method-5.mm b/gcc-4.9/gcc/testsuite/obj-c++.dg/method-5.mm
new file mode 100644
index 000000000..17c841a46
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/obj-c++.dg/method-5.mm
@@ -0,0 +1,30 @@
+/* Do not warn about "slightly" mismatched method signatures if
+ -Wstrict-selector-match is off. */
+
+/* { dg-do compile } */
+/* { dg-options "-Wno-strict-selector-match" } */
+
+#include <objc/objc.h>
+
+typedef enum { en1_1, en1_2 } En1;
+typedef enum { en2_1, en2_2 } En2;
+typedef struct { int a, b; } St1;
+typedef struct { unsigned a, b; } St2;
+
+@interface Base
+- (id) meth1: (En1)arg1;
+- (St1) window;
+@end
+
+@interface Derived: Base
+- (id) meth1: (En2)arg1;
+- (St2)window;
+@end
+
+void foo(void) {
+ id r;
+ En1 en;
+
+ [r meth1:en];
+ [r window];
+}