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