Unified · Split
| @@ -3030,6 +3030,8 @@ static void struct_decl(CType *type, int u, int tdef) · 3029 unmodified lines | ||
| 3030 | 3030 | skip(';'); |
| 3031 | 3031 | } |
| 3032 | 3032 | skip('}'); |
| 3033 | + if (!c && flexible) | |
| 3034 | + tcc_error("flexible array member '%s' in otherwise empty struct", get_tok_str(v, NULL)); | |
| 3033 | 3035 | /* store size and alignment */ |
| 3034 | 3036 | s->c = (c + maxalign - 1) & -maxalign; |
| 3035 | 3037 | s->r = maxalign; |