Debian Codegraph @

gcc/testsuite/obj-c++.dg/property/at-property-23.mm

raw
1 /* Contributed by Nicola Pero <[email protected]>, November 2010. */
2 /* { dg-do compile } */
3
4 /* Test that properties of type arrays or bitfields are rejected. */
5
6 #include <stdlib.h>
7 #include <objc/objc.h>
8 #include <objc/runtime.h>
9
10 @interface MyRootClass
11 {
12 Class isa;
13 }
14 @property int a[8]; /* { dg-error "property cannot be an array" } */
15 @property int b:8; /* { dg-error "expected" } */
16 @property int c[]; /* { dg-error "property cannot be an array" } */
17 /* { dg-error "forbids flexible array member" "flexible array member" { target *-*-* } .-1 } */
18 @end