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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [objc.dg/] [fwd-proto-1.m] - Blame information for rev 867

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
/* Test forward-decls for @protocols.  */
2
/* Author: Ziemowit Laski <zlaski@apple.com>.  */
3
/* { dg-do compile } */
4
 
5
/* One-line substitute for objc/objc.h */
6
typedef struct objc_object { struct objc_class *class_pointer; } *id;
7
 
8
@protocol Bar;
9
@protocol Boo;
10
 
11
@protocol Foo
12
- (id <Bar>)someMethod;
13
- (id <Baz>)anotherMethod; /* { dg-error "annot find protocol declaration" } */
14
@end
15
 
16
@protocol Bar <Boo>
17
- (id <Foo>)someOtherMethod;
18
- (id <Baz>)anotherMethod; /* { dg-error "annot find protocol declaration" } */
19
- (id <Boo>)yetAnotherMethod;
20
@end
21
 
22
/* The following worthy test is stubbed out until we can get the
23
   harness to match correctly on the "compilation terminated" message
24
   when running on GNU/Linux.  sts 2001-08-01 */
25
#if 0
26
@protocol Boo <Bar>   /* { /*dg*/-error "has circular dependency" } */
27
@end
28
#endif
29
 

powered by: WebSVN 2.1.0

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