From: mrs Date: Tue, 17 May 2005 19:59:15 +0000 (+0000) Subject: Yet more Objective-C++... X-Git-Url: http://git.sourceforge.jp/view?p=pf3gnuchains%2Fgcc-fork.git;a=commitdiff_plain;h=4147cbe98b8be76efe77da77de7091e723a005df 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@99851 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 09e8bfacd2c..4a49b014550 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,13 @@ +2005-05-17 Mike Stump + + 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 * 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 37677a1ccaa..9fa8cb6d988 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 a4c1323fac8..aa94bac6775 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 */ /* { dg-do compile } */ +/* { dg-options "-Wstrict-selector-match" } */ #include @@ -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 f84759c2169..60ec455e182 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 */ + /* { dg-do compile } */ +/* { dg-options "-Wstrict-selector-match" } */ #include @@ -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 3921663ec8f..28f6a1be621 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 */ + /* { dg-do compile } */ +/* { dg-options "-Wstrict-selector-match" } */ #include @@ -31,13 +33,13 @@ + (NTGridDataObject*)dataObject:(id)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 \\)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 \\)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 b2550da1148..35d60e96c00 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 . */ /* { dg-options "-fobjc-exceptions" } */