diff options
Diffstat (limited to 'gcc/testsuite/objc.dg/method-18.m')
-rw-r--r-- | gcc/testsuite/objc.dg/method-18.m | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/gcc/testsuite/objc.dg/method-18.m b/gcc/testsuite/objc.dg/method-18.m new file mode 100644 index 00000000000..77fd3ef1b7f --- /dev/null +++ b/gcc/testsuite/objc.dg/method-18.m @@ -0,0 +1,29 @@ +/* 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]; +} |