[hackers] [scc] [cc1] Calls to eqtype() in parithmetic() || Roberto E. Vargas Caballero

From: <git_AT_suckless.org>
Date: Fri, 30 Sep 2016 10:53:32 +0200 (CEST)

commit 13fc67fc4de717eae74ff53404f762abc74fc754
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Fri Sep 30 10:52:31 2016 +0200
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Fri Sep 30 10:52:31 2016 +0200

    [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

diff --git a/cc1/expr.c b/cc1/expr.c
index 9543c69..a9945c9 100644
--- a/cc1/expr.c
+++ b/cc1/expr.c
_AT_@ -309,7 +309,7 @@ parithmetic(char op, Node *lp, Node *rp)
         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);
Received on Fri Sep 30 2016 - 10:53:32 CEST

This archive was generated by hypermail 2.3.0 : Fri Sep 30 2016 - 11:00:20 CEST