From: johanknol Date: Mon, 1 Oct 2001 12:42:29 +0000 (+0000) Subject: Fixed bug #466586 part 1 X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=dc2a1b446d6e97491820555a343187052c58a792;p=fw%2Fsdcc Fixed bug #466586 part 1 git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1335 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/src/SDCC.y b/src/SDCC.y index ba26488b..d1590b2f 100644 --- a/src/SDCC.y +++ b/src/SDCC.y @@ -776,7 +776,13 @@ struct_declarator_list ; struct_declarator - : declarator + : declarator + { + // if this was a function declarator, remove the symbol args (if any) + if (IS_FUNC($1->etype)) { + cleanUpLevel(SymbolTab,NestLevel+1); + } + } | ':' constant_expr { $$ = newSymbol (genSymName(NestLevel),NestLevel) ; $$->bitVar = (int) floatFromVal(constExprValue($2,TRUE)); @@ -917,6 +923,7 @@ declarator2 $1->hasVargs = IS_VARG($4); $1->args = reverseVal($4) ; + /* nest level was incremented to take care of the parms */ NestLevel-- ; currBlockno--;