aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/testsuite/ChangeLog10
-rw-r--r--gcc/testsuite/objc.dg/method-5.m4
-rw-r--r--gcc/testsuite/objc.dg/method-6.m11
-rw-r--r--gcc/testsuite/objc.dg/method-7.m12
-rw-r--r--gcc/testsuite/objc.dg/method-9.m14
-rw-r--r--gcc/testsuite/objc.dg/try-catch-2.m4
6 files changed, 35 insertions, 20 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 09e8bfa..4a49b01 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,13 @@
+2005-05-17 Mike Stump <mrs@apple.com>
+
+ Yet more Objective-C++...
+
+ * objc.dg/method-5.m: Update.
+ * objc.dg/method-6.m: Update.
+ * objc.dg/method-7.m: Update.
+ * objc.dg/method-9.m: Update.
+ * objc.dg/try-catch-2.m: Update.
+
2005-05-17 Mark Mitchell <mark@codesourcery.com>
* gcc.dg/compat/struct-layout-1_generate.c (iterative_hash):
diff --git a/gcc/testsuite/objc.dg/method-5.m b/gcc/testsuite/objc.dg/method-5.m
index 37677a1..9fa8cb6 100644
--- a/gcc/testsuite/objc.dg/method-5.m
+++ b/gcc/testsuite/objc.dg/method-5.m
@@ -11,8 +11,8 @@ void foo(UnderSpecified *u, NotAClass *n) {
[n nonexistent_method]; /* { dg-warning "invalid receiver type" } */
/* { dg-warning "no .\\-nonexistent_method. method found" "" { target *-*-* } 11 } */
[NotAClass nonexistent_method]; /* { dg-error ".NotAClass. is not an Objective\\-C class name or alias" } */
- [u nonexistent_method]; /* { dg-warning ".UnderSpecified. may not respond to .\\-nonexistent_method." } */
- [UnderSpecified nonexistent_method]; /* { dg-warning ".UnderSpecified. may not respond to .\\+nonexistent_method." } */
+ [u nonexistent_method]; /* { dg-warning "no .\\-nonexistent_method. method found" } */
+ [UnderSpecified nonexistent_method]; /* { dg-warning "no .\\+nonexistent_method. method found" } */
}
/* { dg-warning "Messages without a matching method signature" "" { target *-*-* } 0 } */
diff --git a/gcc/testsuite/objc.dg/method-6.m b/gcc/testsuite/objc.dg/method-6.m
index a4c1323..aa94bac 100644
--- a/gcc/testsuite/objc.dg/method-6.m
+++ b/gcc/testsuite/objc.dg/method-6.m
@@ -2,6 +2,7 @@
unless they reside in root classes. */
/* Author: Ziemowit Laski <zlaski@apple.com> */
/* { dg-do compile } */
+/* { dg-options "-Wstrict-selector-match" } */
#include <objc/Protocol.h>
@@ -19,13 +20,13 @@ void foo(void) {
Class receiver;
[receiver port]; /* { dg-warning "multiple methods named .\\+port. found" } */
- /* { dg-warning "using .\\-\\(unsigned( int)?\\)port." "" { target *-*-* } 9 } */
- /* { dg-warning "also found .\\+\\(Protocol \\*\\)port." "" { target *-*-* } 14 } */
+ /* { dg-warning "using .\\-\\(unsigned( int)?\\)port." "" { target *-*-* } 10 } */
+ /* { dg-warning "also found .\\+\\(Protocol \\*\\)port." "" { target *-*-* } 15 } */
[receiver starboard]; /* { dg-warning "no .\\+starboard. method found" } */
- /* { dg-warning "Messages without a matching method signature" "" { target *-*-* } 25 } */
- /* { dg-warning "will be assumed to return .id. and accept" "" { target *-*-* } 25 } */
- /* { dg-warning ".\.\.\.. as arguments" "" { target *-*-* } 25 } */
+ /* { 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 } */
[Class port]; /* { dg-error ".Class. is not an Objective\\-C class name or alias" } */
}
diff --git a/gcc/testsuite/objc.dg/method-7.m b/gcc/testsuite/objc.dg/method-7.m
index f84759c..60ec455 100644
--- a/gcc/testsuite/objc.dg/method-7.m
+++ b/gcc/testsuite/objc.dg/method-7.m
@@ -1,6 +1,8 @@
/* Check if finding multiple signatures for a method is handled gracefully. */
/* Author: Ziemowit Laski <zlaski@apple.com> */
+
/* { dg-do compile } */
+/* { dg-options "-Wstrict-selector-match" } */
#include <objc/Object.h>
@@ -16,12 +18,12 @@ id foo(void) {
Object *obj = [[Object alloc] init];
id obj2 = obj;
[obj setWindow:nil]; /* { dg-warning ".Object. may not respond to .\\-setWindow:." } */
- /* { dg-warning "Messages without a matching method signature" "" { target *-*-* } 18 } */
- /* { dg-warning "will be assumed to return .id. and accept" "" { target *-*-* } 18 } */
- /* { dg-warning ".\.\.\.. as arguments" "" { target *-*-* } 18 } */
+ /* { dg-warning "Messages without a matching method signature" "" { target *-*-* } 20 } */
+ /* { dg-warning "will be assumed to return .id. and accept" "" { target *-*-* } 20 } */
+ /* { dg-warning ".\.\.\.. as arguments" "" { target *-*-* } 20 } */
[obj2 setWindow:nil]; /* { dg-warning "multiple methods named .\\-setWindow:. found" } */
- /* { dg-warning "using .\\-\\(void\\)setWindow:\\(Object \\*\\)wdw." "" { target *-*-* } 8 } */
- /* { dg-warning "also found .\\-\\(void\\)setWindow:\\(Class1 \\*\\)window." "" { target *-*-* } 12 } */
+ /* { dg-warning "using .\\-\\(void\\)setWindow:\\(Object \\*\\)wdw." "" { target *-*-* } 10 } */
+ /* { dg-warning "also found .\\-\\(void\\)setWindow:\\(Class1 \\*\\)window." "" { target *-*-* } 14 } */
return obj;
}
diff --git a/gcc/testsuite/objc.dg/method-9.m b/gcc/testsuite/objc.dg/method-9.m
index 3921663..28f6a1b 100644
--- a/gcc/testsuite/objc.dg/method-9.m
+++ b/gcc/testsuite/objc.dg/method-9.m
@@ -1,7 +1,9 @@
/* Check if finding multiple signatures for a method is handled gracefully
when method lookup succeeds (see also method-7.m). */
/* Contributed by Ziemowit Laski <zlaski@apple.com> */
+
/* { dg-do compile } */
+/* { dg-options "-Wstrict-selector-match" } */
#include <objc/Object.h>
@@ -31,13 +33,13 @@
+ (NTGridDataObject*)dataObject:(id<MyObject, MyCoding>)data
{
NTGridDataObject *result = [[NTGridDataObject alloc] initWithData:data];
- /* { dg-warning "multiple methods named .\\-initWithData:. found" "" { target *-*-* } 33 } */
- /* { dg-warning "using .\\-\\(id\\)initWithData:\\(Object \\*\\)data." "" { target *-*-* } 9 } */
- /* { dg-warning "also found .\\-\\(id\\)initWithData:\\(id <MyObject, MyCoding>\\)data." "" { target *-*-* } 17 } */
- /* { dg-warning "also found .\\-\\(id\\)initWithData:\\(int\\)data." "" { target *-*-* } 13 } */
+ /* { dg-warning "multiple methods named .\\-initWithData:. found" "" { target *-*-* } 35 } */
+ /* { dg-warning "using .\\-\\(id\\)initWithData:\\(Object \\*\\)data." "" { target *-*-* } 11 } */
+ /* { dg-warning "also found .\\-\\(id\\)initWithData:\\(id <MyObject, MyCoding>\\)data." "" { target *-*-* } 19 } */
+ /* { dg-warning "also found .\\-\\(id\\)initWithData:\\(int\\)data." "" { target *-*-* } 15 } */
- /* The following warning is a consequence of picking the "wrong" method signature. */
- /* { dg-warning "passing argument 1 of .initWithData:. from incompatible pointer type" "" { target *-*-* } 33 } */
+ /* The following warning is a consequence of picking the "wrong" method signature. */
+ /* { dg-warning "passing argument 1 of .initWithData:. from incompatible pointer type" "" { target *-*-* } 35 } */
return result;
}
@end
diff --git a/gcc/testsuite/objc.dg/try-catch-2.m b/gcc/testsuite/objc.dg/try-catch-2.m
index b2550da..35d60e9 100644
--- a/gcc/testsuite/objc.dg/try-catch-2.m
+++ b/gcc/testsuite/objc.dg/try-catch-2.m
@@ -1,5 +1,5 @@
-/* Test out '@catch(id foo) {...}', which should catch
- all uncaught exceptions. */
+/* Test out '@catch(id foo) {...}', which should catch all uncaught
+ exceptions. */
/* Developed by Ziemowit Laski <zlaski@apple.com>. */
/* { dg-options "-fobjc-exceptions" } */