commit 3618cdb4bcb74744323c340615242234ccf49fa2
Author:     Roberto E. Vargas Caballero <[email protected]>
AuthorDate: Wed Aug 26 22:28:07 2015 +0200
Commit:     Roberto E. Vargas Caballero <[email protected]>
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
@@ -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);
@@ -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;

Reply via email to