From: uz Date: Mon, 26 Oct 2009 10:17:17 +0000 (+0000) Subject: Fixed a bug in the last change. For variables that have no initializer, no X-Git-Tag: V2.13.1~138 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=7687489a08d40295ed3401caaca2b40256668620;p=cc65 Fixed a bug in the last change. For variables that have no initializer, no storage was allocated if -Cl (static locals) was in effect. git-svn-id: svn://svn.cc65.org/cc65/trunk@4390 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/src/cc65/locals.c b/src/cc65/locals.c index 61ec01a3d..be5c09970 100644 --- a/src/cc65/locals.c +++ b/src/cc65/locals.c @@ -324,6 +324,12 @@ static unsigned ParseAutoDecl (Declaration* Decl, unsigned* SC) /* Mark the variable as referenced */ *SC |= SC_REF; + + } else { + + /* No assignment - allocate a label and space for the variable */ + SymData = AllocStorage (g_usebss, Size); + } }