[hackers] [scc] [cc1] Fix parsing of long double || Roberto E. Vargas Caballero

From: <git_AT_suckless.org>
Date: Tue, 21 Jun 2016 19:52:07 +0200 (CEST)

commit 8b63549d2bedf450ed8dd6d0087216b752b0ef14
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Mon Jun 20 17:40:08 2016 +0200
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Mon Jun 20 17:42:03 2016 +0200

    [cc1] Fix parsing of long double
    
    An anciant version of the token encoding had LLONG equal to 2*LONG,
    but this is not true since long time ago. The problem in this complex
    type check is that double is equal to long float.

diff --git a/cc1/types.c b/cc1/types.c
index 72d5fa8..5974cff 100644
--- a/cc1/types.c
+++ b/cc1/types.c
_AT_@ -145,7 +145,10 @@ ctype(unsigned type, unsigned sign, unsigned size)
         case DOUBLE:
                 if (size == LLONG)
                         goto invalid_type;
- size += LONG;
+ if (size == LONG)
+ size = LLONG;
+ else
+ size = LONG;
                 goto floating;
         case FLOAT:
                 if (size == LLONG)
Received on Tue Jun 21 2016 - 19:52:07 CEST

This archive was generated by hypermail 2.3.0 : Tue Jun 21 2016 - 20:00:17 CEST