Yet more Objective-C++...
authorZiemowit Laski <zlaski@apple.com>
Tue, 17 May 2005 19:59:15 +0000 (19:59 +0000)
committerMike Stump <mrs@gcc.gnu.org>
Tue, 17 May 2005 19:59:15 +0000 (19:59 +0000)
        * 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.

From-SVN: r99851

gcc/testsuite/ChangeLog
gcc/testsuite/objc.dg/method-5.m
gcc/testsuite/objc.dg/method-6.m
gcc/testsuite/objc.dg/method-7.m
gcc/testsuite/objc.dg/method-9.m
gcc/testsuite/objc.dg/try-catch-2.m

index 09e8bfacd2cd2f24096d38fd9b54fec4dc763b6f..4a49b014550040d57a5e0e46c012fd96325387bc 100644 (file)
@@ -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):
index 37677a1ccaa4df818084fb6b6263ebd1c6a24714..9fa8cb6d9889d608f763d8a592f1d977de5e196f 100644 (file)
@@ -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 } */
index a4c1323fac8bb78cd274f163883707bd84176697..aa94bac67751aae40dfa42e5e00b1b400bec5127 100644 (file)
@@ -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" } */
 }
index f84759c2169f1522a3937c6143298ce27b6fda07..60ec455e182a065cb0f5b065abb10b5fe0829287 100644 (file)
@@ -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;
 }
index 3921663ec8f99c1e76a7bd95855f9435494af700..28f6a1be6215c99e3b8b0109a9549cc698712d7d 100644 (file)
@@ -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>
 
 + (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
index b2550da11480f00d57964af89382f58d73822ac5..35d60e96c001405503fad50dd5592c6a9729b318 100644 (file)
@@ -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" } */