[PATCH] bfd: fix build with C23
Guinevere Larsen
guinevere@redhat.com
Mon Dec 8 11:46:51 GMT 2025
On 12/5/25 8:12 PM, Alan Modra wrote:
> On Fri, Dec 05, 2025 at 05:03:12PM -0300, Guinevere Larsen wrote:
>> Starting in C23, strchr and strrchr will return const char *, if fed a
>> const char *. This means that several files in the BFD directory will
>> fail to build as they are assigning the return of those functions to a
>> char *.
>>
>> Fix this by const-ifying several variables. The only place where that
>> wasn't just that was in targets.c, where a variable was being used in
>> subsequent strrchr invocations to change the underlying string, so a new
>> variable had to be introduced.
> OK.
>
Thanks for the quick review! I pushed the patch
--
Cheers,
Guinevere Larsen
It/she
More information about the Binutils
mailing list