[hackers] [scc] Add error recovery in incdec() || Roberto E. Vargas Caballero

From: <git_AT_suckless.org>
Date: Fri, 4 Sep 2015 20:22:39 +0200 (CEST)

commit a1ec56af45b62704436f4f95ebc443cdf22383be
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Fri Sep 4 18:46:28 2015 +0200
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Fri Sep 4 18:46:28 2015 +0200

    Add error recovery in incdec()

diff --git a/cc1/expr.c b/cc1/expr.c
index 3d26622..55ad6b1 100644
--- a/cc1/expr.c
+++ b/cc1/expr.c
_AT_@ -468,7 +468,8 @@ incdec(Node *np, char op)
                 inc = constnode(one);
                 break;
         default:
- error("incorrect type in arithmetic operation");
+ errorp("wrong type argument to increment or decrement");
+ return np;
         }
         return arithmetic(op, np, inc);
 }
Received on Fri Sep 04 2015 - 20:22:39 CEST

This archive was generated by hypermail 2.3.0 : Fri Sep 04 2015 - 20:24:21 CEST