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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [obj-c++.dg/] [property/] [synthesize-11.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 errors when @synthesize is used with bitfield instance variables in an incorrect way.  */
5
 
6
#include 
7
#include 
8
#include 
9
 
10
@interface MyRootClass
11
{
12
  Class isa;
13
  int countA : 2;                  /* { dg-message "originally specified here" } */
14
  int countB : 3;                  /* { dg-message "originally specified here" } */
15
}
16
+ (id) initialize;
17
+ (id) alloc;
18
- (id) init;
19
@property int countA;
20
@property (nonatomic) short countB;
21
@end
22
 
23
@implementation MyRootClass
24
+ (id) initialize { return self; }
25
+ (id) alloc { return class_createInstance (self, 0); }
26
- (id) init { return self; }
27
@synthesize countA; /* { dg-error ".atomic. property .countA. is using bit-field instance variable .countA." } */
28
@synthesize countB; /* { dg-error "property .countB. is using instance variable .countB. of incompatible type" } */
29
@end /* { dg-warning "incomplete implementation of class" } */
30
/* { dg-message "method definition for ..setCountA.. not found" "" { target *-*-* } 29 } */
31
/* { dg-message "method definition for ..countA. not found" "" { target *-*-* } 29 } */

powered by: WebSVN 2.1.0

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