commit 5654476dce2255a26d4082d273fa4b654ae2513a
Author: Roberto E. Vargas Caballero <[email protected]>
AuthorDate: Fri Jan 8 12:46:18 2016 +0100
Commit: Roberto E. Vargas Caballero <[email protected]>
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
@@ -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;