From 08173d7f88f8551caca81594ed8af79d82d3f71f Mon Sep 17 00:00:00 2001 From: zinc Date: Thu, 15 Oct 2026 18:25:36 +0330 Subject: constant expressions: c precedence and / % ^ (b.1.3); local const usable in constant expressions (b.1.7, b.2.16); zc0 matches --- src/compiler/stmt.zc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/compiler/stmt.zc') diff --git a/src/compiler/stmt.zc b/src/compiler/stmt.zc index 007306c..e98cb27 100644 --- a/src/compiler/stmt.zc +++ b/src/compiler/stmt.zc @@ -144,7 +144,7 @@ int localdecl(int typed) { newsz = -1; newleaf = 0; if (tk == T_NUM) nomagic = 1; if (t && t[0] == TY_DYN && is_op(s_lb)) c = array_dynamic_literal(t); else c = expr(); rval(); nomagic = 0; kc = xconst && !xfloat; - if (kc) ltag[i] = ltag[i] | LCONST; + if (kc) { ltag[i] = ltag[i] | LCONST; lkval[i] = xcval; } if (c == C_FRESH) { lnsz[i] = newsz; lleaf[i] = newleaf; if (drop_tail == here) local_dropset[i] = 1; } if (t) fcoerce(t); vaddr(i); -- cgit v1.2.3