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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [objc.dg/] [property/] [at-property-14.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
#include <objc/objc.h>
5
 
6
@interface MyRootClass
7
{
8
  Class isa;
9
}
10
 
11
/* Test the warnings on 'assign'.  */
12
@property id property_a;      /* { dg-warning "object property .property.a. has no .assign., .retain. or .copy. attribute" } */
13
                              /* { dg-message ".assign. can be unsafe for Objective-C objects" "" { target *-*-* } 12 } */
14
 
15
@property (readonly) id property_b; /* No 'assign' warning (assign semantics do not matter if the property is readonly).  */
16
@property id *property_c;           /* No 'assign' warning (the type is not an Objective-C object).  */
17
@property Class property_d;         /* No 'assign' warning (Classes are static objects so assign semantics do not matter for them).  */
18
@property MyRootClass *property_e;  /* { dg-warning "object property .property.e. has no .assign., .retain. or .copy. attribute" } */
19
                                    /* { dg-message ".assign. can be unsafe for Objective-C objects" "" { target *-*-* } 18 } */
20
@end

powered by: WebSVN 2.1.0

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