diff options
author | Michael Forney <mforney@mforney.org> | 2019-04-23 20:34:11 -0700 |
---|---|---|
committer | Michael Forney <mforney@mforney.org> | 2019-04-23 20:34:11 -0700 |
commit | c557c2dbe484a725ae9233b706dffc2a184bdcc2 (patch) | |
tree | 814cb09540544b66dc2a7e3d47bbf0db2cf94db4 /expr.c | |
parent | 185261f4e8fea2afbd9b75a9e2a03f902f1ab238 (diff) |
expr: Use tokstr in ++/-- operator error messages
Diffstat (limited to 'expr.c')
-rw-r--r-- | expr.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -659,9 +659,9 @@ unaryexpr(struct scope *s) next(); l = unaryexpr(s); if (!l->lvalue) - error(&tok.loc, "operand of %srement operator must be an lvalue", op == TINC ? "inc" : "dec"); + error(&tok.loc, "operand of '%s' operator must be an lvalue", tokstr[op]); if (l->qual & QUALCONST) - error(&tok.loc, "operand of %srement operator is const qualified", op == TINC ? "inc" : "dec"); + error(&tok.loc, "operand of '%s' operator is const qualified", tokstr[op]); e = mkexpr(EXPRINCDEC, l->type); e->incdec.op = op; e->incdec.base = l; |