[hackers] [scc] Convert compare() to use the new fileds in Type || Roberto E. Vargas Caballero
commit 8fd6d549ca3d5dc3072327e31f85e2ef9b8de088
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Thu Jan 7 21:32:44 2016 +0100
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Fri Jan 8 10:49:29 2016 +0100
Convert compare() to use the new fileds in Type
diff --git a/cc1/expr.c b/cc1/expr.c
index 175cd2d..4a33fd9 100644
--- a/cc1/expr.c
+++ b/cc1/expr.c
_AT_@ -344,6 +344,9 @@ pcompare(char op, Node *lp, Node *rp)
Node *np;
int err = 0;
+ if (lp->type->integer)
+ XCHG(lp, rp, np);
+
if (rp->type->integer) {
if (!cmpnode(rp, 0))
err = 1;
_AT_@ -366,8 +369,9 @@ compare(char op, Node *lp, Node *rp)
lp = decay(lp);
rp = decay(rp);
+
ltp = lp->type;
- rtp = rtp->type;
+ rtp = rp->type;
if (ltp->op == PTR || rtp->op == PTR) {
return pcompare(op, rp, lp);
Received on Fri Jan 08 2016 - 13:13:58 CET
This archive was generated by hypermail 2.3.0
: Fri Jan 08 2016 - 13:24:48 CET