]> git.sur5r.net Git - cc65/commitdiff
The check for illegal storage classes on globals was wrong
authorcuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Mon, 20 Jan 2003 06:02:33 +0000 (06:02 +0000)
committercuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Mon, 20 Jan 2003 06:02:33 +0000 (06:02 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@1907 b7a2c559-68d2-44c3-8de9-860c34a00d81

src/cc65/compile.c

index 59698803627c15591976695dd66a39f839e543fe..77abffb4344d0252d95e4d03ae0b30e346ab1169 100644 (file)
@@ -107,7 +107,8 @@ static void Parse (void)
        ParseDeclSpec (&Spec, SC_EXTERN | SC_STATIC, T_INT);
 
        /* Don't accept illegal storage classes */
-       if (Spec.StorageClass == SC_AUTO || Spec.StorageClass == SC_REGISTER) {
+               if ((Spec.StorageClass & SC_AUTO) != 0 || 
+            (Spec.StorageClass & SC_REGISTER) != 0) {
            Error ("Illegal storage class");
            Spec.StorageClass = SC_EXTERN | SC_STATIC;
        }