]> git.sur5r.net Git - cc65/commitdiff
Fix wrong check for typedef which caused non allocation of storage for structs
authoruz <uz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sat, 29 Aug 2009 19:05:01 +0000 (19:05 +0000)
committeruz <uz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sat, 29 Aug 2009 19:05:01 +0000 (19:05 +0000)
after the latest changes.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4074 b7a2c559-68d2-44c3-8de9-860c34a00d81

src/cc65/compile.c

index c51191885b665e8bc14b3eebad2bfc487f16b1de..befb1e9c682a35d95d9da15ffa98e866aca26169 100644 (file)
@@ -141,8 +141,8 @@ static void Parse (void)
              * specified as static. This means that "extern int i" will not
              * get storage allocated.
              */
-           if ((Decl.StorageClass & SC_FUNC) == 0      &&
-                (Decl.StorageClass & SC_TYPEDEF) == 0   &&
+           if ((Decl.StorageClass & SC_FUNC) != SC_FUNC          &&
+                (Decl.StorageClass & SC_TYPEDEF) != SC_TYPEDEF    &&
                 ((Spec.Flags & DS_DEF_STORAGE) != 0  ||
                  (Decl.StorageClass & (SC_STATIC | SC_EXTERN)) == SC_STATIC)) {