From dc2a1b446d6e97491820555a343187052c58a792 Mon Sep 17 00:00:00 2001 From: johanknol Date: Mon, 1 Oct 2001 12:42:29 +0000 Subject: [PATCH] Fixed bug #466586 part 1 git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1335 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- src/SDCC.y | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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--; -- 2.30.2