aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/codegen.c
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2025-09-14 01:18:16 +0900
committernsfisis <nsfisis@gmail.com>2025-09-14 01:20:01 +0900
commit6a45ad108293f9fa4f90eed55fc1101711bcc0ee (patch)
treebf3c39cb721bb86085e9555224651dd2c72ef069 /src/codegen.c
parent90246b99595e86e5e6fe41973db1a00171cf0462 (diff)
downloadducc-6a45ad108293f9fa4f90eed55fc1101711bcc0ee.tar.gz
ducc-6a45ad108293f9fa4f90eed55fc1101711bcc0ee.tar.zst
ducc-6a45ad108293f9fa4f90eed55fc1101711bcc0ee.zip
fix: work-around for issue where storage class is changed somewhere
Diffstat (limited to 'src/codegen.c')
-rw-r--r--src/codegen.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/codegen.c b/src/codegen.c
index db6514d..716660d 100644
--- a/src/codegen.c
+++ b/src/codegen.c
@@ -597,7 +597,7 @@ static void codegen_stmt(CodeGen* g, AstNode* ast) {
static void codegen_func(CodeGen* g, AstNode* ast) {
g->current_func = ast;
- if (ast->ty->result->storage_class != StorageClass_static) {
+ if (ast->ty->storage_class != StorageClass_static) {
fprintf(g->out, ".globl %s\n", ast->name);
}
fprintf(g->out, "%s:\n", ast->name);