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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [objc.dg/] [property/] [dynamic-6.m] - Blame information for rev 704

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 704 jeremybenn
/* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, November 2010.  */
2
/* { dg-do compile } */
3
 
4
/* Test case when an accessor from a @property matches a method
5
   required by a protocol.  If the @property is @dynamic, then no
6
   warning should be generated.  */
7
 
8
#include <objc/objc.h>
9
#include <objc/runtime.h>
10
#include <stdlib.h>
11
 
12
@protocol Count
13
- (int) count;
14
@end
15
 
16
@interface MyRootClass <Count>
17
{
18
  Class isa;
19
}
20
@property int count;
21
@end
22
 
23
@implementation MyRootClass
24
/* This @dynamic turns off any warnings for -count and -setCount:.  */
25
@dynamic count;
26
@end

powered by: WebSVN 2.1.0

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