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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [objc.dg/] [property/] [synthesize-11.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>, 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 <stdlib.h>
7
#include <objc/objc.h>
8
#include <objc/runtime.h>
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-warning "method definition for ..setCountA.. not found" "" { target *-*-* } 29 } */
31
/* { dg-warning "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.