8sa1-gcc/gcc/testsuite/gcc.dg/c99-flex-array-1.c
Richard Henderson 00de56c7d0 20000926-1.c: Update expected warnings.
* gcc.dg/20000926-1.c: Update expected warnings.
        * gcc.dg/array-2.c: Likewise.
        * gcc.dg/array-4.c: Also validate flexible array members.
        * gcc.dg/c99-flex-array-1.c: New.

From-SVN: r38704
2001-01-04 21:56:00 -08:00

9 lines
386 B
C

/* Test for invalid uses of flexible array members. */
/* { dg-do compile } */
/* { dg-options "-std=iso9899:1999 -pedantic-errors" } */
struct s1 { int x[]; }; /* { dg-error "empty struct" "empty" } */
struct s2 { int :1; int x[]; }; /* { dg-error "empty struct" "empty" } */
struct s3 { int x[]; int y; }; /* { dg-error "not at end" "not at end" } */
struct s4 { int x; int y[]; };