public inbox for binutils-cvs@sourceware.org
 help / color / mirror / Atom feed
* [binutils-gdb] loongarch: 'index' shadows global
@ 2024-01-05  2:31 Alan Modra
  0 siblings, 0 replies; only message in thread
From: Alan Modra @ 2024-01-05  2:31 UTC (permalink / raw)
  To: bfd-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=375beedfd34162b1aeb9b28cacd6f458834716da

commit 375beedfd34162b1aeb9b28cacd6f458834716da
Author: Alan Modra <amodra@gmail.com>
Date:   Wed Jan 3 16:03:48 2024 +1030

    loongarch: 'index' shadows global
    
    Avoid an error when compiling with older versions of gcc.
    
            * elfnn-loongarch.c (loongarch_relax_align): Rename "index" to
            "sym_index".

Diff:
---
 bfd/elfnn-loongarch.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/bfd/elfnn-loongarch.c b/bfd/elfnn-loongarch.c
index 2f1c78ab4f8..0987628098e 100644
--- a/bfd/elfnn-loongarch.c
+++ b/bfd/elfnn-loongarch.c
@@ -4309,8 +4309,8 @@ loongarch_relax_align (bfd *abfd, asection *sec,
 {
   bfd_vma  addend, max = 0, alignment = 1;
 
-  int index = ELFNN_R_SYM (rel->r_info);
-  if (index > 0)
+  int sym_index = ELFNN_R_SYM (rel->r_info);
+  if (sym_index > 0)
     {
       alignment = 1 << (rel->r_addend & 0xff);
       max = rel->r_addend >> 8;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-01-05  2:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-05  2:31 [binutils-gdb] loongarch: 'index' shadows global Alan Modra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).