scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | README | LICENSE

commit 0654230abc8c9cef6f0603ec456ef63471599e86
parent 0ee5b49181c1813e136046ad648f909fe6102ea4
Author: Roberto E. Vargas Caballero <k0ga@shike2.net>
Date:   Fri,  1 May 2026 22:22:23 +0200

Merge branch 'master' into dev

Diffstat:
Msrc/cmd/scc-cc/cc1/init.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/cmd/scc-cc/cc1/init.c b/src/cmd/scc-cc/cc1/init.c @@ -471,7 +471,7 @@ emitstrings(Node *np) emit(ODECL, sym); emit(OINIT, constnode(sym)); } else if (f == SINITLST) { - n = np->type->n.elem; + n = (np->type->op == UNION) ? 1 : np->type->n.elem; for (i = 0; i < n; ++i) emitstrings(sym->u.init[i]); }