2007-03-01 Paul Brook <paul@codesourcery.com>
[official-gcc.git] / gcc / testsuite / objc.dg / selector-1.m
blobb9cc5e0807d7147b1bf54c9aa0f0d10e59b9d0bf
1 /* Test warning for non existing selectors.  */
2 /* Contributed by Devang Patel <dpatel@apple.com>.  */
3 /* { dg-options "-Wselector -fnext-runtime" } */
4 /* { dg-do compile } */
6 typedef struct objc_object { struct objc_class *class_pointer; } *id;
7 typedef struct objc_selector    *SEL;
9 @interface Foo
10 - (void) foo;
11 - (void) bar;
12 @end
14 @implementation Foo
15 - (void) bar
19 - (void) foo
21   SEL a,b,c;
22   a = @selector(b1ar); /* { dg-warning "creating selector for nonexistent method .b1ar." } */
23   b = @selector(bar);
25 @end