[binutils-gdb] libsframe: testsuite: remove usage of ##__VA_ARGS__

Indu Bhagat ibhagat@sourceware.org
Wed Nov 26 06:44:10 GMT 2025


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=39b6fee4842875e29803f2ef92f52de185e84f36

commit 39b6fee4842875e29803f2ef92f52de185e84f36
Author: Indu Bhagat <indu.bhagat@oracle.com>
Date:   Tue Nov 25 22:31:17 2025 -0800

    libsframe: testsuite: remove usage of ##__VA_ARGS__
    
    '##__VA_ARGS' is a GNU extension, the usage of which in the testsuite of
    libsframe may cause failure to build on platforms where the compiler may
    not support the GNU extension.
    
    This GNU extension swallows the preceding comma if the variable
    arguments list is empty.  In libsframe testsuite though, an empty list
    is never used.  Usages will remain of the following type:
      - TEST (cond, "string", vars);
    or
      - TEST (cond, "string");
    
    Mailing list discussion:
    https://sourceware.org/pipermail/binutils/2025-November/145825.html
    
    PR libsframe/33437
    
    libsframe/testsuite/
            PR libsframe/33437
            * sframe-test.h: Replace ##__VA_ARGS__ with __VA_ARGS__.

Diff:
---
 libsframe/testsuite/sframe-test.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libsframe/testsuite/sframe-test.h b/libsframe/testsuite/sframe-test.h
index d8a8d377c90..8b430e4ac35 100644
--- a/libsframe/testsuite/sframe-test.h
+++ b/libsframe/testsuite/sframe-test.h
@@ -40,13 +40,13 @@ void wait (void);
 #include <dejagnu.h>
 #undef wait
 
-#define TEST(cond, subname, ...)					\
+#define TEST(cond, ...)							\
   do									\
     {									\
       if (cond)								\
-	pass (subname, ##__VA_ARGS__);					\
+	pass (__VA_ARGS__);						\
       else								\
-	fail (subname, ##__VA_ARGS__);					\
+	fail (__VA_ARGS__);						\
     }									\
     while (0)


More information about the Binutils-cvs mailing list