[PATCH 3/4] ld: Fix discarded-qualifiers problems in ldlang.c

Simon Marchi simon.marchi@polymtl.ca
Sun Apr 26 02:51:05 GMT 2026



On 2026-04-24 22:19, Calvin Owens wrote:
>     ../../ld/ldlang.c: In function ‘archive_path’:
>     ../../ld/ldlang.c:347:5: error: assignment discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
>       347 |   p = strchr (pattern, link_info.path_separator);
>           |     ^
> 
> Because the prior patch refactored input_statement_is_archive_path() to
> take a constant pointer as its second argument, fix this by making the
> return type of archive_path() const, and fixing up its two callers.

There is one more to change in this file, variable `bslash` at line 10957.

Simon


More information about the Binutils mailing list