2014-07-11 Edward Smith-Rowland <3dw4rd@verizon.net>
[official-gcc.git] / gcc / testsuite / obj-c++.dg / selector-4.mm
blob690cc44b698a9ff5fd938394b5a2aac2246d1a60
1 /* Test warning for non existing selectors.  */
2 /* Contributed by Devang Patel <dpatel@apple.com>.  */
4 /* { dg-options "-Wselector -fnext-runtime" } */
5 /* { dg-do compile } */
7 typedef struct objc_object { struct objc_class *class_pointer; } *id;
8 typedef struct objc_selector *SEL;
10 @interface Foo
11 - (void) foo;
12 - (void) bar;
13 @end
15 @implementation Foo
16 - (void) bar
20 - (void) foo
22   SEL a,b,c;
23   a = @selector(b1ar); /* { dg-warning "creating selector for nonexistent method .b1ar." } */
24   b = @selector(bar);
26 @end