[hackers] [scc] Convert pcompare() to use new fields of type || Roberto E. Vargas Caballero
commit a142f2ed782fe618116e51495f9404740087f4a1
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Thu Jan 7 21:22:52 2016 +0100
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Fri Jan 8 10:49:29 2016 +0100
Convert pcompare() to use new fields of type
diff --git a/cc1/expr.c b/cc1/expr.c
index 8b7fa6e..175cd2d 100644
--- a/cc1/expr.c
+++ b/cc1/expr.c
_AT_@ -288,11 +288,16 @@ convert(Node *np, Type *newtp, char iscast)
return castcode(np, newtp);
}
+#define XCHG(lp, rp, np) (np = lp, lp = rp, rp = np)
+
static Node *
parithmetic(char op, Node *lp, Node *rp)
{
Type *tp;
- Node *size;
+ Node *size, *np;
+
+ if (lp->type->op != PTR)
+ XCHG(lp, rp, np);
tp = lp->type;
size = sizeofnode(tp->type);
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:45 CET