ox

The Ox programming language, compiler and tools (WIP)
Log | Files | Refs | README | LICENSE

commit d521f293e63dd78f49fb300cd8023c79c077d15e
parent c9a4c6ef2fd33b4c469c07f88759342ae389dd1f
Author: citbl <citbl@citbl.org>
Date:   Sat,  1 Nov 2025 17:07:59 +1000

allow not initial value in decl

Diffstat:
Msrc/gen/gen.c | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/gen/gen.c b/src/gen/gen.c @@ -787,7 +787,8 @@ build_var_decl_statement(Gen* gen, Node* node) if (rvalue) gcc_jit_block_add_assignment(gen->curr_block, loc, var_decl, rvalue); } - if (node->data.var_decl.init == NULL) { panic("could not instanciate gcc jit new local"); } + // this is not an error, there is just no initial value + // if (node->data.var_decl.init == NULL) { panic("could not instanciate gcc jit new local"); } printf("adding 1 symbol: %s\n", var_name);