ref: 8fd6d549ca3d5dc3072327e31f85e2ef9b8de088
parent: a142f2ed782fe618116e51495f9404740087f4a1
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Thu Jan 7 16:32:44 EST 2016
Convert compare() to use the new fileds in Type
--- a/cc1/expr.c
+++ b/cc1/expr.c
@@ -344,6 +344,9 @@
Node *np;
int err = 0;
+ if (lp->type->integer)
+ XCHG(lp, rp, np);
+
if (rp->type->integer) {
if (!cmpnode(rp, 0))
err = 1;
@@ -366,8 +369,9 @@
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);