URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Go to most recent revision |
Only display areas with differences |
Details |
Blame |
View Log
Rev 154 |
Rev 816 |
/* { dg-do compile } */
|
/* { dg-do compile } */
|
|
|
#include
|
#include
|
|
|
@protocol Foo
|
@protocol Foo
|
- (id)meth1;
|
- (id)meth1;
|
- (id)meth2:(int)arg;
|
- (id)meth2:(int)arg;
|
@end
|
@end
|
|
|
@interface Derived1: Object
|
@interface Derived1: Object
|
@end
|
@end
|
|
|
@interface Derived2: Object
|
@interface Derived2: Object
|
+ (Derived1 *)new;
|
+ (Derived1 *)new;
|
@end
|
@end
|
|
|
id func(void) {
|
id func(void) {
|
Object *o = [Object new];
|
Object *o = [Object new];
|
return o; /* { dg-warning "class .Object. does not implement the .Foo. protocol" } */
|
return o; /* { dg-warning "class .Object. does not implement the .Foo. protocol" } */
|
}
|
}
|
|
|
@implementation Derived2
|
@implementation Derived2
|
+ (Derived1 *)new {
|
+ (Derived1 *)new {
|
Derived2 *o = [super new];
|
Derived2 *o = [super new];
|
return o; /* { dg-warning "distinct Objective\\-C type in return" } */
|
return o; /* { dg-warning "distinct Objective\\-C type in return" } */
|
}
|
}
|
@end
|
@end
|
|
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.