shithub: scc

Download patch

ref: 7810da634afacef19f9e265883de786bf1fcb322
parent: 5763a15c686c2197d369ccf742718eb4a9f02271
author: Roberto E. Vargas Caballero <[email protected]>
date: Tue Apr 22 03:40:50 EDT 2014

Remove use of BTYPE in array()

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

--- a/expr.c
+++ b/expr.c
@@ -266,12 +266,9 @@
 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;