[hackers] [scc] [cc1] Fix inc/dec operators || Roberto E. Vargas Caballero

From: <git_AT_suckless.org>
Date: Thu, 2 Feb 2017 13:59:17 +0100 (CET)

commit e2576771fbb06b5768b0f2fcb06941f872ec3f38
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Thu Feb 2 13:53:24 2017 +0100
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
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
_AT_@ -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 *
Received on Thu Feb 02 2017 - 13:59:17 CET

This archive was generated by hypermail 2.3.0 : Thu Feb 02 2017 - 14:00:21 CET