[PATCH 2/3] gas/gen-sframe: avoid gcc extension using __VA_ARGS__
Indu Bhagat
indu.bhagat@oracle.com
Mon Dec 8 18:56:21 GMT 2025
On 12/8/25 2:16 AM, Jan Beulich wrote:
> On 08.12.2025 11:08, Jens Remus wrote:
>> On 12/8/2025 8:27 AM, Jan Beulich wrote:
>>> On 05.12.2025 16:05, Jens Remus wrote:
>>>> On 12/5/2025 2:32 PM, Jan Beulich wrote:
>>>>> 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).
>>>>>
>>>>> --- 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 not supported for target"), ".sframe");
>>
>> Maybe change as follows to ease grepping for the error message?
>>
>> sframe_as_bad ("%s", _(".sframe not supported for target"));
>
> Possible as well. I actually like pulling out the non-translatable directive,
> but I also can see your point about grep-ability (which would go away though
> anyway if true parametrization would be necessary). Indu's call, in the end.
>
I think sframe_as_bad ("%s", _(".sframe not supported for target")); may
be slightly better. We may have a usecase for sframe_as_warn () later.
There may not be a clear non-translatable subset of the string in some
cases for sframe_as_warn () like:
as_warn (_("no SFrame FDE emitted; XYZ"));
In which case, switching over to:
sframe_as_warn ("%s", _("no SFrame FDE emitted; XYZ"));
will at least look more homogeneous (and grep-ability is not adversely
affected).
Thanks for taking care of this,
Indu
More information about the Binutils
mailing list