commit 8b63549d2bedf450ed8dd6d0087216b752b0ef14
Author:     Roberto E. Vargas Caballero <[email protected]>
AuthorDate: Mon Jun 20 17:40:08 2016 +0200
Commit:     Roberto E. Vargas Caballero <[email protected]>
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
@@ -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)

Reply via email to