URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
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 |
|
|
id property_a;
|
10 |
|
|
int property_b;
|
11 |
|
|
int property_c;
|
12 |
|
|
int property_d;
|
13 |
|
|
id property_e;
|
14 |
|
|
id property_f;
|
15 |
|
|
id property_g;
|
16 |
|
|
id property_h;
|
17 |
|
|
}
|
18 |
|
|
|
19 |
|
|
/* Test various error messages. */
|
20 |
|
|
@property id property_a; /* { dg-warning "object property .property.a. has no .assign., .retain. or .copy. attribute" } */
|
21 |
|
|
/* { dg-message ".assign. can be unsafe for Objective-C objects" "" { target *-*-* } 20 } */
|
22 |
|
|
@property int property_b = 4; /* { dg-error "expected" } */
|
23 |
|
|
@property (retain) int property_c; /* { dg-error ".retain. attribute is only valid for Objective-C objects" } */
|
24 |
|
|
@property (copy) int property_d; /* { dg-error ".copy. attribute is only valid for Objective-C objects" } */
|
25 |
|
|
|
26 |
|
|
@property (retain) id property_e;
|
27 |
|
|
@property (retain) id property_f;
|
28 |
|
|
@property (retain) id property_g;
|
29 |
|
|
@property (retain) id property_h;
|
30 |
|
|
@property (retain) id property_e; /* { dg-error "redeclaration of property .property_e." } */
|
31 |
|
|
/* { dg-message "originally specified here" "" { target *-*-* } 26 } */
|
32 |
|
|
@end
|
33 |
|
|
|
34 |
|
|
@property id test; /* { dg-error "property declaration not in .interface or .protocol context" } */
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.