| 1 |
/* PR120353: Test for -Wflex-array-member-not-at-end on structure with |
| 2 |
typedef. */ |
| 3 |
/* { dg-do compile } */ |
| 4 |
/* { dg-options "-Wflex-array-member-not-at-end" } */ |
| 5 |
|
| 6 |
typedef struct flex flex_t; |
| 7 |
struct flex { int n; int data[]; }; |
| 8 |
struct out_flex_mid {flex_t flex_data; int m; }; /* { dg-warning "structure containing a flexible array member is not at the end of another structure" } */ |
| 9 |
|
| 10 |
typedef struct flex flex_t1; |
| 11 |
struct out_flex_mid1 {flex_t1 flex_data1; int n; }; /* { dg-warning "structure containing a flexible array member is not at the end of another structure" } */ |