[binutils-gdb] gas/gen-sframe: avoid gcc extension using __VA_ARGS__
Jan Beulich
jbeulich@sourceware.org
Fri Dec 12 14:03:19 GMT 2025
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=26ea095fa700498dd497286432c5bac62dc79a49
commit 26ea095fa700498dd497286432c5bac62dc79a49
Author: Jan Beulich <jbeulich@suse.com>
Date: Fri Dec 12 15:00:41 2025 +0100
gas/gen-sframe: avoid gcc extension using __VA_ARGS__
We shouldn't be using extensions when we don't have a suitable fallback in
place. Introducing a format-argument-less counterpart macro would feel a
little odd here. Instead make the sole use site have a (fake) argument
(the non-translatable part of the string).
Diff:
---
gas/dw2gencfi.c | 2 +-
gas/gen-sframe.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/gas/dw2gencfi.c b/gas/dw2gencfi.c
index 96964c13508..44124807416 100644
--- a/gas/dw2gencfi.c
+++ b/gas/dw2gencfi.c
@@ -2622,7 +2622,7 @@ cfi_finish (void)
#endif
/* Avoid erroring with DEFAULT_SFRAME for non-default options, like
-32 on x86_64. */
- sframe_as_bad (_(".sframe not supported for target"));
+ sframe_as_bad ("%s", _(".sframe not supported for target"));
}
if ((all_cfi_sections & CFI_EMIT_debug_frame) != 0)
diff --git a/gas/gen-sframe.h b/gas/gen-sframe.h
index d5cad324da6..21ca29b7c6d 100644
--- a/gas/gen-sframe.h
+++ b/gas/gen-sframe.h
@@ -28,7 +28,7 @@
#define sframe_as_bad(format, ...) \
do { \
if (flag_gen_sframe == GEN_SFRAME_ENABLED) \
- as_bad (format, ##__VA_ARGS__); \
+ as_bad (format, __VA_ARGS__); \
} while (0)
#define SFRAME_FRE_ELEM_LOC_REG 0
More information about the Binutils-cvs
mailing list