ref: 9ddae457b5c0790d6293dcb24b445079017d2afe
parent: 89b2b2847a7c0e350b7b9ec2de0a4f0eb9a01e59
author: Ori Bernstein <[email protected]>
date: Thu Jun 7 12:39:55 EDT 2012
NULL-terminate expr lists properly.
--- a/8/isel.c
+++ b/8/isel.c
@@ -75,7 +75,7 @@
/* used to decide which operator is appropriate
* for implementing various conditional operators */
struct {
- AsmOp test;
+ AsmOp test;
AsmOp jmp;
AsmOp getflag;
} reloptab[Numops] = {
--- a/8/reduce.c
+++ b/8/reduce.c
@@ -309,7 +309,7 @@
die("Can't index type %s\n", tystr(n->expr.type));
u = rval(s, args[1]);
sz = size(n);
- v = mkexpr(-1, Omul, u, mkexpr(-1, Olit, mkint(-1, sz), NULL));
+ v = mkexpr(-1, Omul, u, mkexpr(-1, Olit, mkint(-1, sz), NULL), NULL);
r = mkexpr(-1, Oadd, t, v, NULL);
return r;
}
@@ -329,7 +329,7 @@
}
/* safe: all types have a sub[0] that we want to grab */
sz = tysize(n->expr.type->sub[0]);
- v = mkexpr(-1, Omul, u, mkexpr(-1, Olit, mkint(-1, sz), NULL));
+ v = mkexpr(-1, Omul, u, mkexpr(-1, Olit, mkint(-1, sz), NULL), NULL);
return mkexpr(-1, Oadd, u, v, NULL);
}