OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [obj-c++.dg/] [comp-types-11.mm] - Diff between revs 308 and 338

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

Rev 308 Rev 338
/* { dg-do compile } */
/* { dg-do compile } */
#include "../objc-obj-c++-shared/Object1.h"
#include "../objc-obj-c++-shared/Object1.h"
@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
 
 

powered by: WebSVN 2.1.0

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