]> git.sur5r.net Git - cc65/commitdiff
Fixed a bug in the last change. For variables that have no initializer, no
authoruz <uz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Mon, 26 Oct 2009 10:17:17 +0000 (10:17 +0000)
committeruz <uz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Mon, 26 Oct 2009 10:17:17 +0000 (10:17 +0000)
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

src/cc65/locals.c

index 61ec01a3d9a2363b9c3864cc2b87738e7e6558f8..be5c09970c5f427225057cb64840665706adf621 100644 (file)
@@ -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);
+
         }
     }