commit 9536419154ea4a8f648c59298e99ad29dbae2a6b
Author:     Roberto E. Vargas Caballero <[email protected]>
AuthorDate: Tue Nov 29 11:43:19 2016 +0100
Commit:     Roberto E. Vargas Caballero <[email protected]>
CommitDate: Tue Nov 29 11:43:19 2016 +0100

    [cc1] Remove RANK_INT from arch.h
    
    We do not need it because we can take the rank directly
    from the inttype, and it must be the same value.

diff --git a/cc1/arch/amd64-sysv/arch.h b/cc1/arch/amd64-sysv/arch.h
index f64e99d..6e36646 100644
--- a/cc1/arch/amd64-sysv/arch.h
+++ b/cc1/arch/amd64-sysv/arch.h
@@ -1,5 +1,3 @@
 /* See LICENSE file for copyright and license details. */
 
-#define RANK_INT     3
-
 #define L_ENUM      L_INT32
diff --git a/cc1/arch/i386-sysv/arch.h b/cc1/arch/i386-sysv/arch.h
index f64e99d..6e36646 100644
--- a/cc1/arch/i386-sysv/arch.h
+++ b/cc1/arch/i386-sysv/arch.h
@@ -1,5 +1,3 @@
 /* See LICENSE file for copyright and license details. */
 
-#define RANK_INT     3
-
 #define L_ENUM      L_INT32
diff --git a/cc1/arch/qbe/arch.h b/cc1/arch/qbe/arch.h
index 7daee37..6e36646 100644
--- a/cc1/arch/qbe/arch.h
+++ b/cc1/arch/qbe/arch.h
@@ -1,4 +1,3 @@
 /* See LICENSE file for copyright and license details. */
 
-#define RANK_INT     3
 #define L_ENUM      L_INT32
diff --git a/cc1/arch/z80/arch.h b/cc1/arch/z80/arch.h
index 4b6de22..c8ef7a1 100644
--- a/cc1/arch/z80/arch.h
+++ b/cc1/arch/z80/arch.h
@@ -1,5 +1,3 @@
 /* See LICENSE file for copyright and license details. */
 
-#define RANK_INT     3
-
 #define L_ENUM      L_INT16
diff --git a/cc1/types.c b/cc1/types.c
index d9c28e5..58aa01c 100644
--- a/cc1/types.c
+++ b/cc1/types.c
@@ -284,7 +284,7 @@ mktype(Type *tp, int op, TINT nelem, Type *pars[])
                break;
        case ENUM:
                type.prop |= TPRINTED | TINTEGER | TARITH;
-               type.n.rank = RANK_INT;
+               type.n.rank = inttype->n.rank;
                break;
        case STRUCT:
        case UNION:

Reply via email to