Unified · Split
| @@ -8507,6 +8507,13 @@ static void decl(int l) · 8506 unmodified lines | ||
| 8507 | 8507 | error("cannot use local functions"); |
| 8508 | 8508 | if (!(type.t & VT_FUNC)) |
| 8509 | 8509 | expect("function definition"); |
| 8510 | + | |
| 8511 | + /* reject abstract declarators in function definition */ | |
| 8512 | + sym = type.ref; | |
| 8513 | + while ((sym = sym->next) != NULL) | |
| 8514 | + if (!(sym->v & ~SYM_FIELD)) | |
| 8515 | + expect("identifier"); | |
| 8516 | + | |
| 8510 | 8517 | /* XXX: cannot do better now: convert extern line to static inline */ |
| 8511 | 8518 | if ((type.t & (VT_EXTERN | VT_INLINE)) == (VT_EXTERN | VT_INLINE)) |
| 8512 | 8519 | type.t = (type.t & ~VT_EXTERN) | VT_STATIC; |