diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 36234bbb2fe..96b66f584fc 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2005-05-25 Mike Stump + + * obj-c++.dg/selector-1.mm: Move to... + * obj-c++.dg/selector-4.mm: here... + 2005-05-25 Ziemowit Laski * obj-c++.dg/selector-1.mm: New. diff --git a/gcc/testsuite/obj-c++.dg/selector-4.mm b/gcc/testsuite/obj-c++.dg/selector-4.mm new file mode 100644 index 00000000000..b9cc5e0807d --- /dev/null +++ b/gcc/testsuite/obj-c++.dg/selector-4.mm @@ -0,0 +1,26 @@ +/* Test warning for non existing selectors. */ +/* Contributed by Devang Patel . */ +/* { dg-options "-Wselector -fnext-runtime" } */ +/* { dg-do compile } */ + +typedef struct objc_object { struct objc_class *class_pointer; } *id; +typedef struct objc_selector *SEL; + +@interface Foo +- (void) foo; +- (void) bar; +@end + +@implementation Foo +- (void) bar +{ +} + +- (void) foo +{ + SEL a,b,c; + a = @selector(b1ar); /* { dg-warning "creating selector for nonexistent method .b1ar." } */ + b = @selector(bar); +} +@end +