shithub: scc

Download patch

ref: 02f42bf630d362a05aad87898f58964560f0d159
parent: 137ba891bfd52eefe9fcd8e108987ecc782b44a2
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Fri Aug 14 13:44:48 EDT 2015

Fix type qualifiers

This is a very old regression from the days storage quelifiers
were flags.

--- a/cc1/decl.c
+++ b/cc1/decl.c
@@ -265,8 +265,9 @@
 			p = &cls;
 			break;
 		case TQUALIFIER:
-			if ((qlf |= yylval.token) & RESTRICT)
+			if (qlf && qlf != RESTRICT)
 				goto invalid_type;
+			qlf |= yylval.token;
 			next();
 			continue;
 		case TYPEIDEN: