[PATCH] aarch64: fix build with old glibc

Jan Beulich jbeulich@suse.com
Fri Jun 28 07:07:37 GMT 2024


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;


More information about the Binutils mailing list