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] - Blame information for rev 703

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 703 jeremybenn
/* Contributed by Nicola Pero , 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 
9
#include 
10
#include 
11
 
12
@protocol Count
13
- (int) count;
14
@end
15
 
16
@interface MyRootClass 
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.