cproc

Unnamed repository; edit this file 'description' to name the repository.
git clone git://git.nihaljere.xyz/cproc
Log | Files | Refs | Submodules | README | LICENSE

commit 00d412a140c0d9d5bd08d61032a9f15385eceac7
parent e848987b92d22624885ab6c6c525f02717110e00
Author: Michael Forney <mforney@mforney.org>
Date:   Sat, 20 Apr 2019 11:18:00 -0700

expr: Check qualifiers when parsing ++/-- expressions

Diffstat:
Mexpr.c | 4+---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/expr.c b/expr.c @@ -660,10 +660,8 @@ unaryexpr(struct scope *s) l = unaryexpr(s); if (!l->lvalue) error(&tok.loc, "operand of %srement operator must be an lvalue", op == TINC ? "inc" : "dec"); - /* - if (l->qualifiers & QUALCONST) + if (l->qual & QUALCONST) error(&tok.loc, "operand of %srement operator is const qualified", op == TINC ? "inc" : "dec"); - */ e = mkexpr(EXPRINCDEC, l->type); e->incdec.op = op; e->incdec.base = l;