From: cuz Date: Mon, 20 Jan 2003 06:02:33 +0000 (+0000) Subject: The check for illegal storage classes on globals was wrong X-Git-Tag: V2.12.0~1780 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=638f54f3e4ad3ee6e6e5ee8043b48ef43324148c;p=cc65 The check for illegal storage classes on globals was wrong git-svn-id: svn://svn.cc65.org/cc65/trunk@1907 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/src/cc65/compile.c b/src/cc65/compile.c index 596988036..77abffb43 100644 --- a/src/cc65/compile.c +++ b/src/cc65/compile.c @@ -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; }