summaryrefslogtreecommitdiff
path: root/gcc/testsuite/objc.dg/method-6.m
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/objc.dg/method-6.m')
-rw-r--r--gcc/testsuite/objc.dg/method-6.m19
1 files changed, 13 insertions, 6 deletions
diff --git a/gcc/testsuite/objc.dg/method-6.m b/gcc/testsuite/objc.dg/method-6.m
index 8d868d13cc9..a14c14d6d5c 100644
--- a/gcc/testsuite/objc.dg/method-6.m
+++ b/gcc/testsuite/objc.dg/method-6.m
@@ -4,14 +4,21 @@
/* { dg-do compile } */
/* { dg-options "-Wstrict-selector-match" } */
+#ifdef __NEXT_RUNTIME__
+#include <Foundation/NSObject.h>
+#define OBJECT NSObject
+#else
+#include <objc/Object.h>
#include <objc/Protocol.h>
+#define OBJECT Object
+#endif
@interface Base
- (unsigned)port;
@end
@interface Derived: Base
-- (Object *)port;
+- (OBJECT *)port;
+ (Protocol *)port;
- (id)starboard;
@end
@@ -20,13 +27,13 @@ void foo(void) {
Class receiver;
[receiver port]; /* { dg-warning "multiple methods named .\\+port. found" } */
- /* { dg-message "using .\\-\\(unsigned( int)?\\)port." "" { target *-*-* } 10 } */
- /* { dg-message "also found .\\+\\(Protocol \\*\\)port." "" { target *-*-* } 15 } */
+ /* { dg-message "using .\\-\\(unsigned( int)?\\)port." "" { target *-*-* } 17 } */
+ /* { dg-message "also found .\\+\\(Protocol \\*\\)port." "" { target *-*-* } 22 } */
[receiver starboard]; /* { dg-warning "no .\\+starboard. method found" } */
- /* { dg-warning "Messages without a matching method signature" "" { target *-*-* } 26 } */
- /* { dg-warning "will be assumed to return .id. and accept" "" { target *-*-* } 26 } */
- /* { dg-warning ".\.\.\.. as arguments" "" { target *-*-* } 26 } */
+ /* { dg-warning "Messages without a matching method signature" "" { target *-*-* } 33 } */
+ /* { dg-warning "will be assumed to return .id. and accept" "" { target *-*-* } 33 } */
+ /* { dg-warning ".\.\.\.. as arguments" "" { target *-*-* } 33 } */
[Class port]; /* { dg-error ".Class. is not an Objective\\-C class name or alias" } */
}