From: Richard Henderson Date: Fri, 5 Sep 2025 09:30:19 +0000 (+0200) Subject: target/sparc: Allow TRANS macro with no extra arguments X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b7cd0a1821adf9906c5edb248394bb2a95482656;p=thirdparty%2Fqemu.git 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 --- 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