aboutsummaryrefslogtreecommitdiff
path: root/COPYING
diff options
context:
space:
mode:
authorHans-Peter Nilsson <hp@bitrange.com>2020-06-29 03:50:45 +0200
committerHans-Peter Nilsson <hp@bitrange.com>2020-06-29 03:50:45 +0200
commit9f27c36482d98a00d63fe76f7d740d5de4873ead (patch)
treebe7aa89b55ef2125380dd0bf283ecaee6747ae14 /COPYING
parent07d22f648e56d7276fa7a4a73438005448c406fb (diff)
downloadgdb-9f27c36482d98a00d63fe76f7d740d5de4873ead.zip
gdb-9f27c36482d98a00d63fe76f7d740d5de4873ead.tar.gz
gdb-9f27c36482d98a00d63fe76f7d740d5de4873ead.tar.bz2
binutils/dwarf.c: Correct an `index' global shadowing error for pre-4.8 GCC
In older gcc, shadowing a function name with a local variable name is flagged as an error, certainly a bug but which is usually worked around in binutils: gcc -DHAVE_CONFIG_H -I. -I$SRC/binutils -I. -I$SRC/binutils -I../bfd -I$SRC/binutils/../bfd -I$SRC/binutils/../include -DLOCALEDIR="\"/usr/local/share/locale\"" -Dbin_dummy_emulation=bin_vanilla_emulation -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Werror -I$SRC/binutils/../zlib -g -O2 -MT dwarf.o -MD -MP -MF $depbase.Tpo -c -o dwarf.o $SRC/binutils/dwarf.c &&\ mv -f $depbase.Tpo $depbase.Po cc1: warnings being treated as errors $SRC/binutils/dwarf.c: In function 'display_debug_str_offsets': $SRC/binutils/dwarf.c:6913: error: declaration of 'index' shadows a global declaration /usr/include/string.h:309: error: shadowed declaration is here make[4]: *** [dwarf.o] Error 1 See also GCC PR c/53066. This is just another one that crept in since I and others last had to use an old version. The name "idx" was used in the preceding function, display_debug_addr. Also, it was declared c99 style (after a statement in the block). Committed as obvious. binutils: * dwarf.c (display_debug_str_offsets): Rename local variable index to idx. Move to top of function.
Diffstat (limited to 'COPYING')
0 files changed, 0 insertions, 0 deletions