commit adb48e8988aad7d39acdeeb413e99fb4951695af
parent e35c19c1a268f0d66bdb676a5e576da8b5e8d177
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Tue, 25 Aug 2015 15:23:22 +0200
Do not recover in semantic errors
They don't need recover anything.
Diffstat:
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/cc1/decl.c b/cc1/decl.c
@@ -731,9 +731,9 @@ decl(void)
case TQUALIFIER:
case SCLASS:
if (sym->token == TYPEIDEN)
- error("function definition declared 'typedef'");
+ errorp("function definition declared 'typedef'");
if (sym->flags & ISDEFINED)
- error("redefinition of '%s'", sym->name);
+ errorp("redefinition of '%s'", sym->name);
if (sym->flags & ISEXTERN) {
sym->flags &= ~ISEXTERN;
sym->flags |= ISGLOBAL;
diff --git a/cc1/expr.c b/cc1/expr.c
@@ -508,10 +508,10 @@ pcompare(char op, Node *lp, Node *rp)
warn("comparision between different pointer types");
break;
default:
- error("incompatibles type in comparision");
+ errorp("incompatibles type in comparision");
}
- return node(op, lp->type, lp, rp);
+ return node(op, inttype, lp, rp);
}
static Node *
@@ -537,7 +537,7 @@ compare(char op, Node *lp, Node *rp)
return pcompare(op, lp, rp);
default:
nocompat:
- error("incompatibles type in comparision");
+ errorp("incompatibles type in comparision");
}
return simplify(op, inttype, lp, rp);