OSDN Git Service

In gcc/objc/:
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / obj-c++.dg / selector-3.mm
1 /* Test warning for non-existent selectors.  */
2 /* This is the "-fgnu-runtime" variant of objc.dg/selector-1.m.  */
3 /* { dg-options "-Wselector -fgnu-runtime" } */
4 /* { dg-do compile } */
5
6 typedef struct objc_object { struct objc_class *class_pointer; } *id;
7 typedef const struct objc_selector    *SEL;
8
9 @interface Foo
10 - (void) foo;
11 - (void) bar;
12 @end
13
14 @implementation Foo
15 - (void) bar
16 {
17 }
18
19 - (void) foo
20 {
21   SEL a,b,c;
22   a = @selector(b1ar);
23   b = @selector(bar);
24 }
25 @end /* { dg-warning "creating selector for nonexistent method .b1ar." } */
26