From: johanknol Date: Fri, 24 Aug 2001 14:16:12 +0000 (+0000) Subject: partial fix for bug 436868 X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=25c241acce968a58028c3e9310d10bbf72775aa6;p=fw%2Fsdcc partial fix for bug 436868 git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1166 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/src/SDCC.y b/src/SDCC.y index 2127c4e6..8c09fb58 100644 --- a/src/SDCC.y +++ b/src/SDCC.y @@ -58,6 +58,8 @@ STACK_DCL(blockNum,int,MAX_NEST_LEVEL*3) value *cenum = NULL ; /* current enumeration type chain*/ %} +%expect 6 + %union { symbol *sym ; /* symbol table pointer */ structdef *sdef; /* structure definition */ @@ -747,6 +749,9 @@ struct_declaration symbol *sym ; for ( sym = $2 ; sym != NULL ; sym = sym->next ) { + /* make the symbol one level up */ + sym->level-- ; + pointerTypes(sym->type,copyLinkChain($1)); if (!sym->type) { sym->type = copyLinkChain($1);