From: uz Date: Sat, 29 Aug 2009 19:05:01 +0000 (+0000) Subject: Fix wrong check for typedef which caused non allocation of storage for structs X-Git-Tag: V2.13.0rc1~182 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d0c4f85e516604d86c61f6c5a457281ea50963e6;p=cc65 Fix wrong check for typedef which caused non allocation of storage for structs after the latest changes. git-svn-id: svn://svn.cc65.org/cc65/trunk@4074 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/src/cc65/compile.c b/src/cc65/compile.c index c51191885..befb1e9c6 100644 --- a/src/cc65/compile.c +++ b/src/cc65/compile.c @@ -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)) {