[hackers] [scc] [cc1] Remove RANK_INT from arch.h || Roberto E. Vargas Caballero

From: <git_AT_suckless.org>
Date: Tue, 29 Nov 2016 11:50:10 +0100 (CET)

commit 9536419154ea4a8f648c59298e99ad29dbae2a6b
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Tue Nov 29 11:43:19 2016 +0100
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
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
_AT_@ -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
_AT_@ -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
_AT_@ -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
_AT_@ -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
_AT_@ -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:
Received on Tue Nov 29 2016 - 11:50:10 CET

This archive was generated by hypermail 2.3.0 : Tue Nov 29 2016 - 12:00:17 CET