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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [obj-c++.dg/] [property/] [dynamic-6.mm] - Rev 709

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

/* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, November 2010.  */
/* { dg-do compile } */

/* Test case when an accessor from a @property matches a method
   required by a protocol.  If the @property is @dynamic, then no
   warning should be generated.  */

#include <objc/objc.h>
#include <objc/runtime.h>
#include <stdlib.h>

@protocol Count
- (int) count;
@end

@interface MyRootClass <Count>
{
  Class isa;
}
@property int count;
@end

@implementation MyRootClass
/* This @dynamic turns off any warnings for -count and -setCount:.  */
@dynamic count;
@end

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

powered by: WebSVN 2.1.0

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