diff options
| author | 2025-10-20 16:42:08 +0200 | |
|---|---|---|
| committer | 2025-10-20 16:42:08 +0200 | |
| commit | 4de360ee2b48a5a0631c015443cf279277415423 (patch) | |
| tree | a0f142d8313e55fd4208412c5839dab8ed7ed341 /c/c.c | |
| parent | 21be6c1317078691de33c658dfd77755c9f43592 (diff) | |
c: fix initializer designators again (?)
Diffstat (limited to 'c/c.c')
| -rw-r--r-- | c/c.c | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -1501,14 +1501,11 @@ designators(struct initparser *ip, struct comp *cm) error(&span, "member designator used with non-aggregate type '%ty'", ip->sub->ty); else if (tk.t == TKIDENT) { int idx; + //if (!strcmp(tk.s, "_vb")) __asm__("int3;nop"); for (;;) { idx = aggdesignator(ip, ip->sub->ty, tk.s, &span); - if (idx >= 0) break; - if (ip->sub != ip->cur && !ttypenames[typedata[ip->sub->ty.dat].id]) { - /* if in anonymous aggregate, go up and look again */ - --ip->sub; - continue; - } + if (idx >= 0 || ip->sub == ip->cur) break; + --ip->sub; } ip->sub->idx = idx; if (idx < 0) |