From b3f78886ed9ed7e5fc1bd522205e473c3102fc4e Mon Sep 17 00:00:00 2001 From: lemon Date: Wed, 15 Oct 2025 10:06:21 +0200 Subject: c: allow using pointer-decaying types with &&, || --- c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/c.c b/c.c index 2c899ac..b232ba4 100644 --- a/c.c +++ b/c.c @@ -582,7 +582,7 @@ bintypecheck(const struct span *span, enum toktag tt, struct expr *lhs, struct e ty = mktype(TYINT); break; case BCLOG: /* 6.5.13-14 Logical AND/OR operator */ - if (!isscalar(ty) || !isscalar(rhs->ty)) + if (!isscalar(typedecay(ty)) || !isscalar(typedecay(rhs->ty))) goto Error; ty = mktype(TYINT); break; -- cgit v1.2.3