ref: 3618cdb4bcb74744323c340615242234ccf49fa2
parent: deed2f68c71afdeb172a8362c6c9d3f3b9f60c4b
author: Roberto E. Vargas Caballero <[email protected]>
date: Wed Aug 26 18:28:07 EDT 2015
Do not recover in semantic errors in arithmetic() There is no need of synchronize with the input, so don't call error().
--- a/cc1/expr.c
+++ b/cc1/expr.c
@@ -583,7 +583,7 @@
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 @@
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;