aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/objc.dg/type-size-1.m
blob: f2fdae5c382c01c1460893e66ba218896cec9bb4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* Reject ivars with an unknown size.  */
/* Contributed by Ziemowit Laski <zlaski@apple.com>.  */
/* { dg-do compile } */

struct unknownStruct;

@interface ArrayTest
{
    short   unknownSize[unknownValue];  /* { dg-error ".unknownValue. (undeclared|was not declared)" } */
    /* { dg-error "instance variable .unknownSize. has unknown size" "" { target *-*-* } 9 } */
    struct unknownStruct unknownObj;  /* { dg-error "field .unknownObj. has incomplete type" } */
    /* { dg-error "instance variable .unknownObj. has unknown size" "" { target *-*-* } 11 } */
    long    knownSize[3];     /* ok */
    char    zeroSize[2 - 2];  /* ok (apparently) */
    int     missingSize[];  /* { dg-error "instance variable .missingSize. has unknown size" } */
}
@end