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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [objc.dg/] [fwd-proto-1.m] - Diff between revs 149 and 154

Only display areas with differences | Details | Blame | View Log

Rev 149 Rev 154
/* Test forward-decls for @protocols.  */
/* Test forward-decls for @protocols.  */
/* Author: Ziemowit Laski <zlaski@apple.com>.  */
/* Author: Ziemowit Laski <zlaski@apple.com>.  */
/* { dg-do compile } */
/* { dg-do compile } */
 
 
/* One-line substitute for objc/objc.h */
/* One-line substitute for objc/objc.h */
typedef struct objc_object { struct objc_class *class_pointer; } *id;
typedef struct objc_object { struct objc_class *class_pointer; } *id;
 
 
@protocol Bar;
@protocol Bar;
@protocol Boo;
@protocol Boo;
 
 
@protocol Foo
@protocol Foo
- (id <Bar>)someMethod;
- (id <Bar>)someMethod;
- (id <Baz>)anotherMethod; /* { dg-error "annot find protocol declaration" } */
- (id <Baz>)anotherMethod; /* { dg-error "annot find protocol declaration" } */
@end
@end
 
 
@protocol Bar <Boo>
@protocol Bar <Boo>
- (id <Foo>)someOtherMethod;
- (id <Foo>)someOtherMethod;
- (id <Baz>)anotherMethod; /* { dg-error "annot find protocol declaration" } */
- (id <Baz>)anotherMethod; /* { dg-error "annot find protocol declaration" } */
- (id <Boo>)yetAnotherMethod;
- (id <Boo>)yetAnotherMethod;
@end
@end
 
 
/* The following worthy test is stubbed out until we can get the
/* The following worthy test is stubbed out until we can get the
   harness to match correctly on the "compilation terminated" message
   harness to match correctly on the "compilation terminated" message
   when running on GNU/Linux.  sts 2001-08-01 */
   when running on GNU/Linux.  sts 2001-08-01 */
#if 0
#if 0
@protocol Boo <Bar>   /* { /*dg*/-error "has circular dependency" } */
@protocol Boo <Bar>   /* { /*dg*/-error "has circular dependency" } */
@end
@end
#endif
#endif
 
 
 
 

powered by: WebSVN 2.1.0

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