History

reject abstract declarators in function definition (Mauro Persano)

bellard committed 23 years ago

Commit 7b940fc1 parent 21d2d991 file · +7 −0Browse files

Unified · Split

tcc.c+7−0
@@ -8507,6 +8507,13 @@ static void decl(int l) · 8506 unmodified lines
8507 error("cannot use local functions");8507 error("cannot use local functions");
8508 if (!(type.t & VT_FUNC))8508 if (!(type.t & VT_FUNC))
8509 expect("function definition");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 /* XXX: cannot do better now: convert extern line to static inline */8517 /* XXX: cannot do better now: convert extern line to static inline */
8511 if ((type.t & (VT_EXTERN | VT_INLINE)) == (VT_EXTERN | VT_INLINE))8518 if ((type.t & (VT_EXTERN | VT_INLINE)) == (VT_EXTERN | VT_INLINE))
8512 type.t = (type.t & ~VT_EXTERN) | VT_STATIC;8519 type.t = (type.t & ~VT_EXTERN) | VT_STATIC;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t