ref: f4273538d57487fc60fae6a3c6d44b9b083aace8
parent: 468e33cad71d102cc0ccb452af5dfb81d5e5c42f
author: Roberto E. Vargas Caballero <[email protected]>
date: Thu Feb 2 08:53:24 EST 2017
[cc1] Fix inc/dec operators These operators are assignation operators, and they must use the a version of the op used in expressions.
--- a/cc1/expr.c
+++ b/cc1/expr.c
@@ -608,13 +608,13 @@
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 *