commit e2576771fbb06b5768b0f2fcb06941f872ec3f38
Author: Roberto E. Vargas Caballero <[email protected]>
AuthorDate: Thu Feb 2 13:53:24 2017 +0100
Commit: Roberto E. Vargas Caballero <[email protected]>
CommitDate: Thu Feb 2 13:53:24 2017 +0100
[cc1] Fix inc/dec operators
These operators are assignation operators, and they must use
the a version of the op used in expressions.
diff --git a/cc1/expr.c b/cc1/expr.c
index 6ab6932..84b1cac 100644
--- a/cc1/expr.c
+++ b/cc1/expr.c
@@ -608,13 +608,13 @@ incdec(Node *np, int op)
errorp("%s of pointer to an incomplete type",
(op == OINC || op == OA_ADD) ? "increment" :
"decrement");
return np;
- } else if (tp->op == PTR || (tp->prop & TARITH)) {
+ } else if (tp->op == PTR || tp->prop&TARITH) {
inc = constnode(one);
} else {
errorp("wrong type argument to increment or decrement");
return np;
}
- return arithmetic_op(op, np, inc);
+ return arithmetic_aop(op, np, inc);
}
static Node *