ox

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

commit 8a3f64aad987500d0cc2c91693af668e6801ff07
parent a4527f8fdf4c864e58624e0e02cad82be7d98f3d
Author: citbl <citbl@citbl.org>
Date:   Wed, 29 Oct 2025 21:41:17 +1000

minor

Diffstat:
Msrc/gen/gen.c | 14++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/src/gen/gen.c b/src/gen/gen.c @@ -268,7 +268,9 @@ handle_binary_expr(Gen* gen, Node* node) return NULL; } default: - printf("handle_binary_expr unhandled OpType %d (can be ignored in var assignment (for now))\n", op); + printf("handle_binary_expr unhandled OpType %d (can be ignored in var assignment " + "(for now))\n", + op); return NULL; break; } @@ -354,9 +356,9 @@ lower_builtin_print(Gen* gen, Node* node) { size_t argc = node->data.call_expr.len; - for (size_t i = 0; i < argc; i++) { - Node* arg = node->data.call_expr.args[i]; - } + // for (size_t i = 0; i < argc; i++) { + // Node* arg = node->data.call_expr.args[i]; + // } // 1-arg, treat as puts(arg) if (argc == 1) { @@ -371,8 +373,8 @@ lower_builtin_print(Gen* gen, Node* node) // print a integer else if (is_intlike(gen->ctx, t)) { // cast to int for a clean %d - gcc_jit_type* t_int - = gcc_jit_context_get_type(gen->ctx, GCC_JIT_TYPE_INT64_T); + // gcc_jit_type* t_int + // = gcc_jit_context_get_type(gen->ctx, GCC_JIT_TYPE_INT64_T); gcc_jit_rvalue* fmt = gcc_jit_context_new_string_literal(gen->ctx, "%d\n"); gcc_jit_rvalue* ival = arg; //(t == t_int) //? arg