scc

simple C compiler
git clone git://git.2f30.org/scc
Log | Files | Refs | README | LICENSE

commit 7810da634afacef19f9e265883de786bf1fcb322
parent 5763a15c686c2197d369ccf742718eb4a9f02271
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Tue, 22 Apr 2014 07:40:50 +0200

Remove use of BTYPE in array()

This use of BTYPE is obsolete because we have
this information in Node now.

Diffstat:
Mexpr.c | 5+----
1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/expr.c b/expr.c @@ -266,12 +266,9 @@ static Node * array(Node *np1, Node *np2) { Type *tp; - uint8_t t1, t2; char *err; - t1 = BTYPE(np1->type); - t2 = BTYPE(np2->type); - if (t1 != INT && t2 != INT) + if (np1->typeop != INT && np2->typeop != INT) goto bad_subs; np1 = arithmetic(OADD, np1, np2); tp = np1->type;