]> git.mdlowis.com Git - proto/obnc.git/commitdiff
fixed return opcode handling
authorMichael D. Lowis <mike@mdlowis.com>
Wed, 2 Mar 2022 04:17:41 +0000 (23:17 -0500)
committerMichael D. Lowis <mike@mdlowis.com>
Wed, 2 Mar 2022 04:17:41 +0000 (23:17 -0500)
cerise/backend/ssa/codegen.c
cerise/build.sh

index 7baaf67d32a4771c80e5816560d9ba5d2974d1ab..24ee6869c0f69d631a2f3a8edf5bc9265cb3f6dd 100644 (file)
@@ -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;
index f4ad61d16938b18b5900a8817da66426fc66a865..8a849ef4f98119108754f25e8e276d3b7e7e1e19 100755 (executable)
@@ -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