Debian Codegraph @

gcc/testsuite/objc.dg/selector-1.m

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