[hackers] [scc] Do not recover in semantic errors in arithmetic() || Roberto E. Vargas Caballero

From: <git_AT_suckless.org>
Date: Wed, 26 Aug 2015 22:32:48 +0200 (CEST)

commit 3618cdb4bcb74744323c340615242234ccf49fa2
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Wed Aug 26 22:28:07 2015 +0200
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Wed Aug 26 22:28:07 2015 +0200

    Do not recover in semantic errors in arithmetic()
    
    There is no need of synchronize with the input, so don't call
    error().

diff --git a/cc1/expr.c b/cc1/expr.c
index 62466ad..03d7dd3 100644
--- a/cc1/expr.c
+++ b/cc1/expr.c
_AT_@ -583,7 +583,7 @@ arithmetic(char op, Node *lp, Node *rp)
                 return parithmetic(op, lp, rp);
         default:
         incorrect:
- error("incorrect arithmetic operands");
+ errorp("incorrect arithmetic operands");
         }
 
         return simplify(op, lp->type, lp, rp);
_AT_@ -709,7 +709,7 @@ array(Node *lp, Node *rp)
         lp = arithmetic(OADD, lp, rp);
         tp = lp->type;
         if (tp->op != PTR)
- error("subscripted value is neither array nor pointer");
+ errorp("subscripted value is neither array nor pointer");
         lp = node(OPTR, tp->type, lp, NULL);
         lp->lvalue = 1;
         return lp;
Received on Wed Aug 26 2015 - 22:32:48 CEST

This archive was generated by hypermail 2.3.0 : Wed Aug 26 2015 - 22:36:25 CEST