diff options
| author | bellard <bellard> | 2003-07-20 12:40:53 +0000 |
|---|---|---|
| committer | bellard <bellard> | 2003-07-20 12:40:53 +0000 |
| commit | 7b940fcb1b1ae5407c09ae03bbcafc32447e720c (patch) | |
| tree | 46414ee85a9539a8dd3856d4f2eff2aa917da264 /tcc.c | |
| parent | 21d2d99bdc115e1a1944bc0dff9d487103f5799f (diff) | |
| download | tinycc-7b940fcb1b1ae5407c09ae03bbcafc32447e720c.tar.gz tinycc-7b940fcb1b1ae5407c09ae03bbcafc32447e720c.tar.bz2 | |
reject abstract declarators in function definition (Mauro Persano)
Diffstat (limited to 'tcc.c')
| -rw-r--r-- | tcc.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -8507,6 +8507,13 @@ static void decl(int l) error("cannot use local functions"); if (!(type.t & VT_FUNC)) expect("function definition"); + + /* reject abstract declarators in function definition */ + sym = type.ref; + while ((sym = sym->next) != NULL) + if (!(sym->v & ~SYM_FIELD)) + expect("identifier"); + /* XXX: cannot do better now: convert extern line to static inline */ if ((type.t & (VT_EXTERN | VT_INLINE)) == (VT_EXTERN | VT_INLINE)) type.t = (type.t & ~VT_EXTERN) | VT_STATIC; |
