From c05e4ec794f2f32afc5811377aa7d8595da98013 Mon Sep 17 00:00:00 2001 From: Michael Forney Date: Mon, 8 Apr 2024 12:50:27 -0700 Subject: expr: Remove evalexpr() and just use condexpr() with eval() evalexpr() was originally named `constexpr`, since it matched the constant-expression rule in the grammar. It had to be renamed due to conflict with the C23 constexpr keyword. However, since 2e3ecc70, eval has just one argument, so just call eval(condexpr()) directly. --- decl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'decl.c') diff --git a/decl.c b/decl.c index 0075baf..9b7f664 100644 --- a/decl.c +++ b/decl.c @@ -247,7 +247,7 @@ tagspec(struct scope *s) next(); attr(NULL, 0); if (consume(TASSIGN)) { - e = evalexpr(s); + e = eval(condexpr(s)); if (e->kind != EXPRCONST || !(e->type->prop & PROPINT)) error(&tok.loc, "expected integer constant expression"); value = e->u.constant.u; -- cgit v1.2.3