scc

simple C compiler
git clone git://git.2f30.org/scc
Log | Files | Refs | README | LICENSE

commit 40bd70689eb8d87e4cd48a31a9dcd235febcbe01
parent a084860b9939d877698e1cceb49fe10dd1019f39
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Tue, 13 Dec 2016 17:57:01 +0100

[cc1] Fix bug in field()

An anonymous struct had a NULL value in sym, not an
empty string.

Diffstat:
Mcc1/decl.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cc1/decl.c b/cc1/decl.c @@ -616,7 +616,7 @@ field(struct decl *dcl) { static char *anon = "<anonymous>"; Symbol *sym = dcl->sym; - char *name = *sym->name ? sym->name : anon; + char *name = (sym->name) ? sym->name : anon; Type *structp = dcl->parent, *tp = dcl->type; TINT n = structp->n.elem; int err = 0;