From: uz Date: Fri, 19 Aug 2011 15:06:51 +0000 (+0000) Subject: Fixed a bug: The size of a scope is now recorded for all scopes in X-Git-Tag: V2.13.3~231 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=ce85b303c368f06ce835963fe7c1b85b17f0ee27;p=cc65 Fixed a bug: The size of a scope is now recorded for all scopes in SymLeaveLevel. Doing so also in the code for .STRUCT/.UNION will try to enter the .size symbol twice. git-svn-id: svn://svn.cc65.org/cc65/trunk@5231 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/src/ca65/struct.c b/src/ca65/struct.c index 07068ef94..a716c861a 100644 --- a/src/ca65/struct.c +++ b/src/ca65/struct.c @@ -244,17 +244,10 @@ static long DoStructInternal (long Offs, unsigned Type) ConsumeSep (); } - /* If this is not a anon struct, enter a special symbol named ".size" - * into the symbol table of the struct that holds the size of the - * struct. Since the symbol starts with a dot, it cannot be accessed - * by user code. - * Leave the struct scope level. + /* If this is not a anon struct, leave the struct scope level. This will + * also record the size of the scope. */ if (!Anon) { - /* Add a symbol */ - SymEntry* SizeSym = GetSizeOfScope (CurrentScope); - SymDef (SizeSym, GenLiteralExpr (Size), ADDR_SIZE_DEFAULT, SF_NONE); - /* Close the struct scope */ SymLeaveLevel (); }