[hackers] [scc] Convert array() to use new fields in type || Roberto E. Vargas Caballero

From: <git_AT_suckless.org>
Date: Fri, 8 Jan 2016 13:14:01 +0100 (CET)

commit 5654476dce2255a26d4082d273fa4b654ae2513a
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Fri Jan 8 12:46:18 2016 +0100
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Fri Jan 8 12:46:18 2016 +0100

    Convert array() to use new fields in type

diff --git a/cc1/expr.c b/cc1/expr.c
index 3542a81..12b2ff5 100644
--- a/cc1/expr.c
+++ b/cc1/expr.c
_AT_@ -488,7 +488,7 @@ array(Node *lp, Node *rp)
         Type *tp;
         Node *np;
 
- if (BTYPE(lp) != INT && BTYPE(rp) != INT)
+ if (!lp->type->integer && !rp->type->integer)
                 error("array subscript is not an integer");
         np = arithmetic(OADD, decay(lp), decay(rp));
         tp = np->type;
Received on Fri Jan 08 2016 - 13:14:01 CET

This archive was generated by hypermail 2.3.0 : Fri Jan 08 2016 - 13:25:17 CET