Fixed bug #466586 part 1
authorjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Mon, 1 Oct 2001 12:42:29 +0000 (12:42 +0000)
committerjohanknol <johanknol@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Mon, 1 Oct 2001 12:42:29 +0000 (12:42 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1335 4a8a32a2-be11-0410-ad9d-d568d2c75423

src/SDCC.y

index ba26488b57bf5bde08b60ec2cd52bcefa265acc6..d1590b2ff5ad7896e2ee7ef70afb9e18096d4008 100644 (file)
@@ -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--;