From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1062) id 7D9263858D32; Fri, 5 Jan 2024 02:31:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7D9263858D32 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Alan Modra To: bfd-cvs@sourceware.org Subject: [binutils-gdb] loongarch: 'index' shadows global X-Act-Checkin: binutils-gdb X-Git-Author: Alan Modra X-Git-Refname: refs/heads/master X-Git-Oldrev: 1826e070a09060edafc5e7dc2c50d967472622d8 X-Git-Newrev: 375beedfd34162b1aeb9b28cacd6f458834716da Message-Id: <20240105023113.7D9263858D32@sourceware.org> Date: Fri, 5 Jan 2024 02:31:13 +0000 (GMT) X-BeenThere: binutils-cvs@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Binutils-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2024 02:31:13 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D375beedfd341= 62b1aeb9b28cacd6f458834716da commit 375beedfd34162b1aeb9b28cacd6f458834716da Author: Alan Modra Date: Wed Jan 3 16:03:48 2024 +1030 loongarch: 'index' shadows global =20 Avoid an error when compiling with older versions of gcc. =20 * 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 =3D 0, alignment =3D 1; =20 - int index =3D ELFNN_R_SYM (rel->r_info); - if (index > 0) + int sym_index =3D ELFNN_R_SYM (rel->r_info); + if (sym_index > 0) { alignment =3D 1 << (rel->r_addend & 0xff); max =3D rel->r_addend >> 8;