From nobody Tue Jun 3 14:21:05 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4bBXv6302pz5xhwg; Tue, 03 Jun 2025 14:21:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bBXv611wfz3xd3; Tue, 03 Jun 2025 14:21:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1748960466; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BG8aYmnxfia0v+8M+CB//Wo5TKZiUIYyIzS1rnrOylo=; b=oO5A4wC5rxdq9eIFSBygTIL+s2sUV2fy97H61/RK3FZiqME8AN1PK1kQc5tZB7rCqfFILO SqN+yz/2wLMgzK4Bcuh/tgX4Qqsx8nFRDJVFvcXCfL81ioxF2Kf/YM0tyo6cH66WBQ4w/F KhEdhp5phlpv9WGPMSGtUO/CJnu+nSXNAPYn5mog4Qqk/ZNtx0EJyQEP9vsHNxmGD8Xt55 uzAMm3UXZqtUawT2+UPI5nlFC41Rw9730tixp7XOxjxsDRTA0Cs1qeuzt9e7PfhRylwSUC nfPuFk2KfibXsMQ2bsXuiOCOX24CMyWkpWQsl72pgdHwfKL+OokVA1B4R3k6Fg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1748960466; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BG8aYmnxfia0v+8M+CB//Wo5TKZiUIYyIzS1rnrOylo=; b=MUUY5z2lXXJB4yiPC4ylScq9ZOn1ckIyDkJE2AhUxolCGxVO1eGbRiii8iEuVecFp2ENnd LLGP/G552F48/sR8TvHi3M8Q0wssdd5Nq4WK8gAtStnWSqBCIeXOAaJdID0iiQKvq80s8f wIM7M+VfZL6iTzUq53s3W7ufVB6Go11JuIbrNy6lXtKLHRt+4uNKx5hQiorWf5bCyzRbwq xm9E0NmOT7+T+lxTCOTJXttu54Ihez8/000g4h2gCil8j3F0tgOChqfD8uk0VRxLcxYtTd GsyOd5iNrzY4HqZodNr6ymxBIDj55xaHe0DlpyGzZE4kfafwl8hfy2aLUO7Dfg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1748960466; a=rsa-sha256; cv=none; b=uQnjsNcvCn5jrDgT/d9/Uti1k9oZLGzYDZ5fC8X9yXm+PpWp4BOyObjTc/+syiLBcRBkPA S3zx1mV7MmcwiGrwGyeHnCofG1l8npfhzIfco/JvGu9hdY8+Atv0ZSS/TzMlqf/8I3i5e4 T2zQ9w6kvpKRJQRqqxur+mFDaKrCMqqDUadaQNlVgV45dzb7IBMwnaZSL9ekQuw80C3qlm Kr3WdWcDh9MkaJrwbL6X7TfdrZHuAoDbAaixlVXl4ZZKWMuuOALKreNFIqONeS43bWloTO QaEy5mcuiDdNTaPlmR/t3/EsbmimfaWrIz4pm2We2lhzk/jiUYOr4Ud3fdWpwQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bBXv60TJxzhk5; Tue, 03 Jun 2025 14:21:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 553EL5U7024732; Tue, 3 Jun 2025 14:21:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 553EL52R024729; Tue, 3 Jun 2025 14:21:05 GMT (envelope-from git) Date: Tue, 3 Jun 2025 14:21:05 GMT Message-Id: <202506031421.553EL52R024729@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: 680f1a39ee4b - main - libc: Allow more complex expressions for CALL_BLOCK first argument List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 680f1a39ee4b6cd2fb4dcf3de195bd58626b9525 Auto-Submitted: auto-generated The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=680f1a39ee4b6cd2fb4dcf3de195bd58626b9525 commit 680f1a39ee4b6cd2fb4dcf3de195bd58626b9525 Author: Jessica Clarke AuthorDate: 2025-06-03 14:19:04 +0000 Commit: Jessica Clarke CommitDate: 2025-06-03 14:19:04 +0000 libc: Allow more complex expressions for CALL_BLOCK first argument For the case where the compiler supports blocks we only allow the first expression to have an operator if it has as high precedence as a function call, which for blocks effectively means member access and subscripting only, not even a dereference nor a cast. Parenthesise this, as is the case for the missing compiler support case, so that it's more general. --- lib/libc/include/block_abi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libc/include/block_abi.h b/lib/libc/include/block_abi.h index e04998d6148d..cf670c6c079e 100644 --- a/lib/libc/include/block_abi.h +++ b/lib/libc/include/block_abi.h @@ -37,7 +37,7 @@ * compilers that support blocks and exposing the ABI in the source for other * compilers. */ -#define CALL_BLOCK(name, ...) name(__VA_ARGS__) +#define CALL_BLOCK(name, ...) (name)(__VA_ARGS__) #else // !__BLOCKS__ #define DECLARE_BLOCK(retTy, name, argTys, ...)\ struct {\