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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [obj-c++.dg/] [property/] [at-property-18.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
#include 
5
 
6
/* Test that if you have a property declared in a class and a
7
   category, the attributes match.  This is almost the same as
8
   at-property-16.m, but for a category.  It is a separate file
9
   because it is difficult to test multiple messages for the same
10
   line.  */
11
 
12
@interface MyRootClass
13
{
14
  Class isa;
15
}
16
@property (assign) id a;
17
@property (retain) id b;
18
@property int c;
19
@property (nonatomic) int d;
20
@property int e;
21
@property int f;
22
@property int g;
23
@property (readonly) int h;
24
@property (readonly,getter=getMe) int i;
25
@property (nonatomic) float j;
26
@end
27
@interface MyRootClass (Category)
28
@property (retain) id a;         /* { dg-warning "assign semantics attributes of property .a. conflict with previous declaration" } */
29
                                 /* { dg-message "originally specified here" "" { target *-*-* } 16 } */
30
@property (assign) id b;         /* { dg-warning "assign semantics attributes of property .b. conflict with previous declaration" } */
31
                                 /* { dg-message "originally specified here" "" { target *-*-* } 17 } */
32
@property (nonatomic) int c;     /* { dg-warning ".nonatomic. attribute of property .c. conflicts with previous declaration" } */
33
                                 /* { dg-message "originally specified here" "" { target *-*-* } 18 } */
34
@property int d;                 /* { dg-warning ".nonatomic. attribute of property .d. conflicts with previous declaration" } */
35
                                 /* { dg-message "originally specified here" "" { target *-*-* } 19 } */
36
@property (setter=setX:) int e;  /* { dg-warning ".setter. attribute of property .e. conflicts with previous declaration" } */
37
                                 /* { dg-message "originally specified here" "" { target *-*-* } 20 } */
38
@property (getter=x) int f;      /* { dg-warning ".getter. attribute of property .f. conflicts with previous declaration" } */
39
                                 /* { dg-message "originally specified here" "" { target *-*-* } 21 } */
40
@property (readonly) int g;      /* { dg-warning ".readonly. attribute of property .g. conflicts with previous declaration" } */
41
                                 /* { dg-message "originally specified here" "" { target *-*-* } 22 } */
42
@property (readwrite) int h;     /* Ok */
43
@property (readonly) int i;      /* { dg-warning ".getter. attribute of property .i. conflicts with previous declaration" } */
44
                                 /* { dg-message "originally specified here" "" { target *-*-* } 24 } */
45
@property (nonatomic) float j;   /* Ok */
46
@end

powered by: WebSVN 2.1.0

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