Aria

A low-level systems programming language
git clone git://git.m21c.me/Aria.git
Log | Files | Refs | README | LICENSE

commit 2b23ac6c90856ae2c9a3f1a01ce2e28b4618573d
parent b9a1eae5adbb01c621745c98fdea19a3b0afce3c
Author: m21c <ho*******@gmail.com>
Date:   Mon,  6 Jul 2026 20:56:54 +0200

codegen: fix: variable without init should not generate " = "

Diffstat:
Mcompiler.c | 7+++----
1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/compiler.c b/compiler.c @@ -6620,12 +6620,11 @@ cgdeclaration(CodeGen *cg, Node *expr) } else if (decl->kind == DPARAM || decl->kind == DVAR) { if (isrecordenv(decl->parentenv)) return; - cgprintf(cg, " = "); - /* @todo remove condition. it is only for testing structs. - * content may not be NULL otherwise (needs validation) */ - if (decl->u.content) + if (decl->u.content) { + cgprintf(cg, " = "); codegen(cg, decl->u.content); + } } }