Prevent the following code from compiling: int (*fct)[42](int x);
Unified · Split
| @@ -3278,6 +3278,8 @@ static void post_type(CType *type, AttributeDef *ad) · 3277 unmodified lines | |||
| 3278 | skip(']'); | 3278 | skip(']'); |
| 3279 | /* parse next post type */ | 3279 | /* parse next post type */ |
| 3280 | post_type(type, ad); | 3280 | post_type(type, ad); |
| 3281 | if (type->t == VT_FUNC) | ||
| 3282 | tcc_error("declaration of an array of functions"); | ||
| 3281 | t1 |= type->t & VT_VLA; | 3283 | t1 |= type->t & VT_VLA; |
| 3282 | 3284 | ||
| 3283 | if (t1 & VT_VLA) { | 3285 | if (t1 & VT_VLA) { |