summaryrefslogtreecommitdiff
path: root/gcc/testsuite/obj-c++.dg/property/at-property-23.mm
blob: 73138f64c4a3cdaf4e555c831839b7e91571d2e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, November 2010.  */
/* { dg-do compile } */

/* Test that properties of type arrays or bitfields are rejected.  */

#include <stdlib.h>
#include <objc/objc.h>
#include <objc/runtime.h>

@interface MyRootClass
{
  Class isa;
}
@property int a[8]; /* { dg-error "property can not be an array" } */
@property int b:8;  /* { dg-error "expected" } */
@property int c[];  /* { dg-error "property can not be an array" } */
                    /* { dg-error "ISO C.. forbids zero-size array" "" { target *-*-* } 16 } */
@end