From 8ab3a324e2b1da663d1899af89c5b5d70e819cc9 Mon Sep 17 00:00:00 2001 From: Scott Ehlert Date: Mon, 6 Aug 2007 22:26:28 +0000 Subject: [PATCH] Fixed compiler bug where #pragma deprecated would emit a warning twice for stocks --HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401271 --- sourcepawn/compiler/sc1.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/sourcepawn/compiler/sc1.c b/sourcepawn/compiler/sc1.c index 84bef776..d31dd37f 100644 --- a/sourcepawn/compiler/sc1.c +++ b/sourcepawn/compiler/sc1.c @@ -3860,10 +3860,6 @@ static void funcstub(int fnative) */ if (fnative) { if (opertok!=0) { - if (matchtoken('[')) - { - printf("Hrm!\n"); - } needtoken('='); lexpush(); /* push back, for matchtoken() to retrieve again */ } /* if */ @@ -4022,7 +4018,7 @@ static int newfunc(char *firstname,int firsttag,int fpublic,int fstatic,int stoc cidx=code_idx; glbdecl=glb_declared; } /* if */ - if ((sym->flags & flgDEPRECATED)!=0) { + if ((sym->flags & flgDEPRECATED) != 0 && (sym->usage & uSTOCK) == 0) { char *ptr= (sym->documentation!=NULL) ? sym->documentation : ""; error(234,symbolname,ptr); /* deprecated (probably a public function) */ } /* if */ @@ -5659,7 +5655,7 @@ SC_FUNC int constexpr(cell *val,int *tag,symbol **symptr) * In the case a "simple assignment" operator ("=") is used within a test, * the warning "possibly unintended assignment" is displayed. This routine * sets the global variable "sc_intest" to true, it is restored upon termination. - * In the case the assignment was intended, use parantheses around the + * In the case the assignment was intended, use parentheses around the * expression to avoid the warning; primary() sets "sc_intest" to 0. * * Global references: sc_intest (altered, but restored upon termination)