Fix regression where duplicate function names were not an error.
This commit is contained in:
parent
55a5c745d4
commit
d4fb74ef9a
@ -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 */
|
sym->usage|=uREAD; /* "main()" is the program's entry point: always used */
|
||||||
} /* if */
|
} /* if */
|
||||||
|
|
||||||
|
if ((sym->usage & uDEFINE)!=0)
|
||||||
|
error(21, sym->name);
|
||||||
|
|
||||||
/* "declargs()" found the ")"; if a ";" appears after this, it was a
|
/* "declargs()" found the ")"; if a ";" appears after this, it was a
|
||||||
* prototype */
|
* prototype */
|
||||||
if (matchtoken(';')) {
|
if (matchtoken(';')) {
|
||||||
|
Loading…
Reference in New Issue
Block a user