]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
BFD/ELF: Correct a `remove' global shadowing error for pre-4.8 GCC
authorMaciej W. Rozycki <macro@mips.com>
Tue, 10 Jul 2018 23:42:43 +0000 (00:42 +0100)
committerMaciej W. Rozycki <macro@mips.com>
Tue, 10 Jul 2018 23:45:55 +0000 (00:45 +0100)
commitdf402ddcce738ad2ef24ec7c86611a59ef217fdd
tree5815a95ac4bcfec9b5e116c4c38ef8afda31d4b2
parent21555352f01ab21652f5698e6eddaf42e71b8b9c
BFD/ELF: Correct a `remove' global shadowing error for pre-4.8 GCC

Remove `-Wshadow' compilation errors:

cc1: warnings being treated as errors
.../bfd/elflink.c: In function 'bfd_elf_final_link':
.../bfd/elflink.c:11722: error: declaration of 'remove' shadows a global declaration
/usr/include/stdio.h:154: error: shadowed declaration is here

which for versions of GCC before 4.8 prevent support for ELF targets
from being built.  See also GCC PR c/53066.

bfd/
* elflink.c (bfd_elf_final_link): Rename `remove' local variable
to `remove_section'.

(cherry picked from commit 5270eddc6ed6b5d8e4e2817491bb44b784fa6f81)
bfd/ChangeLog
bfd/elflink.c