Fixed SC_* type masks by making them all bitwise-exclusive.

This commit is contained in:
acqn
2020-07-20 22:34:57 +08:00
committed by Oliver Schmidt
parent e4fc7a0fec
commit 0250c87ac6
5 changed files with 32 additions and 29 deletions

View File

@@ -112,7 +112,7 @@ static void Parse (void)
ParseDeclSpec (&Spec, SC_EXTERN | SC_STATIC, T_INT);
/* Don't accept illegal storage classes */
if ((Spec.StorageClass & SC_TYPE) == 0) {
if ((Spec.StorageClass & SC_TYPEMASK) == 0) {
if ((Spec.StorageClass & SC_AUTO) != 0 ||
(Spec.StorageClass & SC_REGISTER) != 0) {
Error ("Illegal storage class");