The branch main has been updated by jrtc27:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=680f1a39ee4b6cd2fb4dcf3de195bd58626b9525

commit 680f1a39ee4b6cd2fb4dcf3de195bd58626b9525
Author:     Jessica Clarke <jrt...@freebsd.org>
AuthorDate: 2025-06-03 14:19:04 +0000
Commit:     Jessica Clarke <jrt...@freebsd.org>
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 {\

Reply via email to