aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2025-10-15 10:39:41 +0200
committerlemon <lsof@mailbox.org>2025-10-15 10:39:41 +0200
commit1d7b3af0633502c6f63f642d45e5096be28b5f91 (patch)
tree021416543a8376d67dc9b9c3bb074f11b5b698a8
parent08a4e1ef256167ec8c763217a69365385f1da8f2 (diff)
c: cast/compound lit distinction is syntax based
-rw-r--r--c.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/c.c b/c.c
index 7eae3e6..7135108 100644
--- a/c.c
+++ b/c.c
@@ -797,7 +797,7 @@ Unary:
struct decl decl = pdecl(&st, cm);
expect(cm, ')', NULL);
assert(decl.ty.t);
- if ((isagg(decl.ty) || decl.ty.t == TYARRAY) && peek(cm, NULL) == '{') {
+ if (peek(cm, NULL) == '{') {
if (ccopt.cstd < STDC99)
warn(&tk.span, "compound literals are a c99 feature");
ex = initializer(cm, &decl.ty, (decl.scls & SCSTATIC) ? EVSTATICINI : EVFOLD,