This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 397e7e7a4f32a1b0030fc8c5b8311b51189b4062
Author: chenxiaoyi <[email protected]>
AuthorDate: Mon Sep 22 11:05:50 2025 +0800

    macro: use portable variadic macros
    
    The old implementation used a GCC extension related to variadic macros,
    where a name prepends the ellipsis, which has portability issues.
    
    Signed-off-by: chenxiaoyi <[email protected]>
---
 include/nuttx/macro.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/nuttx/macro.h b/include/nuttx/macro.h
index e5a92e18567..6c38aba4b24 100644
--- a/include/nuttx/macro.h
+++ b/include/nuttx/macro.h
@@ -51,8 +51,8 @@
 
 /* Expand the arguments */
 
-#define EXPAND_(x...) x
-#define EXPAND(x...) EXPAND_(x)
+#define EXPAND_(...) __VA_ARGS__
+#define EXPAND(...) EXPAND_(__VA_ARGS__)
 
 /* Reverse the arguments */
 

Reply via email to