From d4fb74ef9a1ab28cd30c242fc4507a419bf9cb5a Mon Sep 17 00:00:00 2001 From: David Anderson Date: Tue, 16 Sep 2014 22:32:46 -0700 Subject: [PATCH] Fix regression where duplicate function names were not an error. --- sourcepawn/compiler/sc1.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sourcepawn/compiler/sc1.cpp b/sourcepawn/compiler/sc1.cpp index 2a4e30e7..d1116997 100644 --- a/sourcepawn/compiler/sc1.cpp +++ b/sourcepawn/compiler/sc1.cpp @@ -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(';')) {