[PATCH] aarch64: fix build with old glibc

Jan Beulich jbeulich@suse.com
Fri Jun 28 11:51:35 GMT 2024


On 28.06.2024 13:29, Richard Earnshaw (lists) wrote:
> On 28/06/2024 08:07, Jan Beulich wrote:
>> As was pointed out several times before, old glibc declares index(),
>> resulting in warnings from -Wshadow, in turn failing the build due to
>> -Werror.
>> ---
>> Is the intermediate local variable needed here at all? Can't we pass the
>> address of operand->imm.value into parse_index_expression()?
>>
>> --- a/gas/config/tc-aarch64.c
>> +++ b/gas/config/tc-aarch64.c
>> @@ -3943,10 +3943,10 @@ parse_shifter_zt0_with_bit_index (char *
>>        return true;
>>      }
>>  
>> -  int64_t index;
>> -  if (!parse_index_expression (str, &index))
>> +  int64_t idx;
>> +  if (!parse_index_expression (str, &idx))
>>        return false;
>> -  operand->imm.value = index;
>> +  operand->imm.value = idx;
>>  
>>    if (!skip_past_comma (str))
>>        return true;
> 
> OK, but I think this counts as obvious :)

Thanks, and yes, I wouldn't have waited for too long before putting this in.
Would be nice though to have an answer to the question raised, as that might
then (or might not) call for a further simplified v2.

Jan


More information about the Binutils mailing list