[hackers] [scc] Fix type qualifiers || Roberto E. Vargas Caballero

From: <git_AT_suckless.org>
Date: Fri, 14 Aug 2015 17:46:38 +0200 (CEST)

commit 02f42bf630d362a05aad87898f58964560f0d159
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Fri Aug 14 17:44:48 2015 +0200
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Fri Aug 14 17:44:48 2015 +0200

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

diff --git a/cc1/decl.c b/cc1/decl.c
index 704ef4f..145d105 100644
--- a/cc1/decl.c
+++ b/cc1/decl.c
_AT_@ -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:
Received on Fri Aug 14 2015 - 17:46:38 CEST

This archive was generated by hypermail 2.3.0 : Fri Aug 14 2015 - 17:48:15 CEST