[hackers] [scc] Fix integer declarations || Roberto E. Vargas Caballero

From: <git_AT_suckless.org>
Date: Mon, 17 Aug 2015 22:53:05 +0200 (CEST)

commit f03283b0bb20076bcdb814658bde66f5c042968c
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Mon Aug 17 21:24:24 2015 +0200
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Mon Aug 17 21:24:24 2015 +0200

    Fix integer declarations
    
    There were a few errors, one that generated error in 'long long'
    and a false warning in declarations without int or char keywords.

diff --git a/cc1/decl.c b/cc1/decl.c
index aa4fd86..581a146 100644
--- a/cc1/decl.c
+++ b/cc1/decl.c
_AT_@ -301,7 +301,8 @@ specifier(int *sclass)
                                 break;
                         case LONG:
                                 if (size == LONG) {
- size = LLONG;
+ yylval.token = LLONG;
+ size = 0;
                                         break;
                                 }
                         case SHORT:
diff --git a/cc1/types.c b/cc1/types.c
index 5957274..2b2156e 100644
--- a/cc1/types.c
+++ b/cc1/types.c
_AT_@ -222,7 +222,6 @@ ctype(unsigned type, unsigned sign, unsigned size)
                         goto invalid_type;
                 return booltype;
         case 0:
- warn("type defaults to 'int' in declaration");
                 /* fallthrough */
         case INT:
                 switch (size) {
Received on Mon Aug 17 2015 - 22:53:05 CEST

This archive was generated by hypermail 2.3.0 : Mon Aug 17 2015 - 23:00:13 CEST