From 75e73c3d0cb482ee084eaf60e1146cd62a481a86 Mon Sep 17 00:00:00 2001 From: "Michael D. Lowis" Date: Tue, 1 Mar 2022 23:17:41 -0500 Subject: [PATCH] fixed return opcode handling --- cerise/backend/ssa/codegen.c | 2 +- cerise/build.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cerise/backend/ssa/codegen.c b/cerise/backend/ssa/codegen.c index 7baaf67..24ee686 100644 --- a/cerise/backend/ssa/codegen.c +++ b/cerise/backend/ssa/codegen.c @@ -277,7 +277,7 @@ void print_op(Parser* p, SsaNode* expr) if (expr->code == RETURN) { printf(" ret "); - emit_type(expr); + emit_type(expr->type); puts(""); } break; diff --git a/cerise/build.sh b/cerise/build.sh index f4ad61d..8a849ef 100755 --- a/cerise/build.sh +++ b/cerise/build.sh @@ -1,6 +1,6 @@ #!/bin/sh -CCCMD="cc -g -Wall -Wextra --std=c99 -Iinc/" +CCCMD="gcc -g -Wall -Wextra -Werror --std=c99 -Iinc/ -fsanitize=undefined" TEST_BACKEND=backend/test # Update tag database and print todos -- 2.49.0