commit 255fd1b32db861184fc12459c2a6a163b4e93e12
parent 94e13f9cd7b5c8e77650c9d7c5d0a768394a905b
Author: m21c <ho*******@gmail.com>
Date: Tue, 23 Jun 2026 06:18:35 +0200
codegen: fix: no name mangling for record fields
Diffstat:
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/compiler.c b/compiler.c
@@ -6436,8 +6436,12 @@ decorate:
}
}
- if (decl)
- cgdeclname(cg, decl);
+ if (decl) {
+ if (cg->env->kind == SSTRUCT || cg->env->kind == SUNION)
+ cgprintf(cg, "%s", getstring(idents, decl->key));
+ else
+ cgdeclname(cg, decl);
+ }
while (pcount > 0) {