From 24dd666121e2786efb82854b05aa71d759e04ee6 Mon Sep 17 00:00:00 2001 From: Mustafa Quraish Date: Sat, 5 Feb 2022 00:57:20 -0500 Subject: Add ability to initialize global variables The code to initialize them is put right before calling `main()` --- src/ast.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ast.c') diff --git a/src/ast.c b/src/ast.c index 62b8b6c..24885c2 100644 --- a/src/ast.c +++ b/src/ast.c @@ -199,7 +199,7 @@ void dump_func(Node *node, int depth) printf("[[%lld]]", node->func.args[i].offset); } printf(")"); - if (node->func.return_type->type != TYPE_NONE) { + if (node->func.return_type->type != TYPE_VOID) { // FIXME: Print return type properly printf(" -> %s", type_to_str(node->func.return_type)); } -- cgit v1.2.3