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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 704 jeremybenn
/* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, October 2010.  */
2
/* { dg-do compile } */
3
 
4
#include <objc/objc.h>
5
 
6
@interface MyRootClass
7
{
8
  Class isa;
9
}
10
@end
11
 
12
@implementation MyRootClass
13
@end
14
 
15
@dynamic isa;  /* { dg-error ".@dynamic. not in @implementation context" } */
16
 
17
@interface Test : MyRootClass
18
{
19
  int v1;
20
}
21
@end
22
@implementation Test
23
@end
24
 
25
 
26
@interface Test (Category)
27
@property int v1;
28
@end
29
@implementation Test (Category)
30
@dynamic v1;
31
@end
32
 
33
 
34
@interface AnotherTest : MyRootClass
35
{
36
}
37
@property int one;
38
@end
39
 
40
@implementation AnotherTest
41
@dynamic one;
42
@dynamic one; /* { dg-error "property .one. already specified in .@dynamic." } */
43
              /* { dg-message "originally specified here" "" { target *-*-* } 41 } */
44
@dynamic three; /* { dg-error "no declaration of property .three. found in the interface" } */
45
@end

powered by: WebSVN 2.1.0

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