shithub: scc

Download patch

ref: 136ad2f9afe68307b2056a256b319cb292017c3c
parent: 85281b2ebed2fb91e230b7b4446e7742a646bb7b
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Fri Sep 30 06:52:31 EDT 2016

[cc1] Calls to eqtype() in parithmetic()

Eqtype() covers all the cases of equality and having all the comparisions
centered will make easier to change the equality terms in the future

--- a/cc1/expr.c
+++ b/cc1/expr.c
@@ -309,7 +309,7 @@
 	size = sizeofnode(tp->type);
 
 	if (op == OSUB && BTYPE(rp) == PTR) {
-		if (tp != rp->type)
+		if (!eqtype(tp, rp->type, 0))
 			goto incorrect;
 		lp = node(OSUB, pdifftype, lp, rp);
 		return node(ODIV, inttype, lp, size);