| OLD | NEW |
| 1 /* Test warning for non existing selectors. */ | 1 /* Test warning for non existing selectors. */ |
| 2 /* Contributed by Devang Patel <dpatel@apple.com>. */ | 2 /* Contributed by Devang Patel <dpatel@apple.com>. */ |
| 3 /* { dg-options "-Wselector -fnext-runtime" } */ | 3 /* { dg-options "-Wselector" } */ |
| 4 /* { dg-do compile } */ | 4 /* { dg-do compile } */ |
| 5 /* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */ |
| 5 | 6 |
| 6 typedef struct objc_object { struct objc_class *class_pointer; } *id; | 7 typedef struct objc_object { struct objc_class *class_pointer; } *id; |
| 7 typedef struct objc_selector *SEL; | 8 typedef struct objc_selector *SEL; |
| 8 | 9 |
| 9 @interface Foo | 10 @interface Foo |
| 10 - (void) foo; | 11 - (void) foo; |
| 11 - (void) bar; | 12 - (void) bar; |
| 12 @end | 13 @end |
| 13 | 14 |
| 14 @implementation Foo | 15 @implementation Foo |
| 15 - (void) bar | 16 - (void) bar |
| 16 { | 17 { |
| 17 } | 18 } |
| 18 | 19 |
| 19 - (void) foo | 20 - (void) foo |
| 20 { | 21 { |
| 21 SEL a,b,c; | 22 SEL a,b,c; |
| 22 a = @selector(b1ar); /* { dg-warning "creating selector for nonexistent method
.b1ar." } */ | 23 a = @selector(b1ar); /* { dg-warning "creating selector for nonexistent method
.b1ar." } */ |
| 23 b = @selector(bar); | 24 b = @selector(bar); |
| 24 } | 25 } |
| 25 @end | 26 @end |
| 26 | 27 |
| OLD | NEW |