diff options
Diffstat (limited to 'gcc/testsuite/objc.dg/method-16.m')
-rw-r--r-- | gcc/testsuite/objc.dg/method-16.m | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc/testsuite/objc.dg/method-16.m b/gcc/testsuite/objc.dg/method-16.m new file mode 100644 index 00000000000..c8394ffbb88 --- /dev/null +++ b/gcc/testsuite/objc.dg/method-16.m @@ -0,0 +1,24 @@ +/* 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> + +@interface Base +- (id) meth1: (Base *)arg1; +- (id) window; +@end + +@interface Derived: Base +- (id) meth1: (Derived *)arg1; +- (Base *)window; +@end + +void foo(void) { + id r; + + [r meth1:r]; + [r window]; +} |