diff options
| author | nsfisis <nsfisis@gmail.com> | 2025-09-03 20:27:16 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2025-09-03 20:27:16 +0900 |
| commit | f3a1ea57244608c1795e7f90cb3077c6a01686a9 (patch) | |
| tree | bfa3d91dd15d5d42043c2ed8fbd717614931d748 /src/codegen.c | |
| parent | 5541c597cb68f76d1fc53e01b931eb870856843c (diff) | |
| download | ducc-f3a1ea57244608c1795e7f90cb3077c6a01686a9.tar.gz ducc-f3a1ea57244608c1795e7f90cb3077c6a01686a9.tar.zst ducc-f3a1ea57244608c1795e7f90cb3077c6a01686a9.zip | |
feat: rewrite function declaration parsing
Diffstat (limited to 'src/codegen.c')
| -rw-r--r-- | src/codegen.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/codegen.c b/src/codegen.c index bce71c9..006ae20 100644 --- a/src/codegen.c +++ b/src/codegen.c @@ -548,7 +548,7 @@ static void codegen_stmt(CodeGen* g, AstNode* ast) { static void codegen_func(CodeGen* g, AstNode* ast) { g->current_func = ast; - if (!ast->node_function_is_static) { + if (ast->ty->result->storage_class != StorageClass_static) { fprintf(g->out, ".globl %s\n", ast->name); } fprintf(g->out, "%s:\n", ast->name); |
