commit 02f42bf630d362a05aad87898f58964560f0d159
parent 137ba891bfd52eefe9fcd8e108987ecc782b44a2
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Fri, 14 Aug 2015 17:44:48 +0200
Fix type qualifiers
This is a very old regression from the days storage quelifiers
were flags.
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/cc1/decl.c b/cc1/decl.c
@@ -265,8 +265,9 @@ specifier(int *sclass)
p = &cls;
break;
case TQUALIFIER:
- if ((qlf |= yylval.token) & RESTRICT)
+ if (qlf && qlf != RESTRICT)
goto invalid_type;
+ qlf |= yylval.token;
next();
continue;
case TYPEIDEN: