commit f03283b0bb20076bcdb814658bde66f5c042968c
Author:     Roberto E. Vargas Caballero <k...@shike2.com>
AuthorDate: Mon Aug 17 21:24:24 2015 +0200
Commit:     Roberto E. Vargas Caballero <k...@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
@@ -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
@@ -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) {

Reply via email to