From b7cd0a1821adf9906c5edb248394bb2a95482656 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Fri, 5 Sep 2025 11:30:19 +0200 Subject: [PATCH] target/sparc: Allow TRANS macro with no extra arguments Use ## to drop the preceding comma if __VA_ARGS__ is empty. Reviewed-by: Mark Cave-Ayland Signed-off-by: Richard Henderson --- target/sparc/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/sparc/translate.c b/target/sparc/translate.c index b922e53bf12..336583beaba 100644 --- a/target/sparc/translate.c +++ b/target/sparc/translate.c @@ -2487,7 +2487,7 @@ static int extract_qfpreg(DisasContext *dc, int x) #define TRANS(NAME, AVAIL, FUNC, ...) \ static bool trans_##NAME(DisasContext *dc, arg_##NAME *a) \ - { return avail_##AVAIL(dc) && FUNC(dc, __VA_ARGS__); } + { return avail_##AVAIL(dc) && FUNC(dc, ## __VA_ARGS__); } #define avail_ALL(C) true #ifdef TARGET_SPARC64 -- 2.47.3