Fix regression where duplicate function names were not an error.

This commit is contained in:
David Anderson 2014-09-16 22:32:46 -07:00
parent 55a5c745d4
commit d4fb74ef9a

View File

@ -5218,6 +5218,9 @@ static int newfunc(declinfo_t *decl, const int *thistag, int fpublic, int fstati
sym->usage|=uREAD; /* "main()" is the program's entry point: always used */
} /* if */
if ((sym->usage & uDEFINE)!=0)
error(21, sym->name);
/* "declargs()" found the ")"; if a ";" appears after this, it was a
* prototype */
if (matchtoken(';')) {