OpenCores
URL https://opencores.org/ocsvn/scarts/scarts/trunk

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [gcc/] [testsuite/] [objc.dg/] [selector-1.m] - Blame information for rev 12

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 12 jlechner
/* Test warning for non existing selectors.  */
2
/* Contributed by Devang Patel <dpatel@apple.com>.  */
3
/* { dg-options "-Wselector -fnext-runtime" } */
4
/* { dg-do compile } */
5
 
6
typedef struct objc_object { struct objc_class *class_pointer; } *id;
7
typedef 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); /* { dg-warning "creating selector for nonexistent method .b1ar." } */
23
  b = @selector(bar);
24
}
25
@end
26
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.