aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2025-10-20 16:42:08 +0200
committerlemon <lsof@mailbox.org>2025-10-20 16:42:08 +0200
commit4de360ee2b48a5a0631c015443cf279277415423 (patch)
treea0f142d8313e55fd4208412c5839dab8ed7ed341
parent21be6c1317078691de33c658dfd77755c9f43592 (diff)
c: fix initializer designators again (?)
-rw-r--r--c/c.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/c/c.c b/c/c.c
index 89bec50..99d3856 100644
--- a/c/c.c
+++ b/c/c.c
@@ -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)