dwarf2read: fix compilation issue with gcc 4.8
authorSimon Marchi <simon.marchi@efficios.com>
Mon, 26 Aug 2019 01:30:02 +0000 (21:30 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Mon, 26 Aug 2019 01:30:12 +0000 (21:30 -0400)
commit23c13d42999cdcf9d224f089891fd3f3c8bdc6aa
tree67385ff61a176a1680fbb2406dd614bd6a4fd92e
parentc9d136dade34a9f15547870f1c59c231d89ded8f
dwarf2read: fix compilation issue with gcc 4.8

gcc 4.8 (and probably other versions too) doesn't like that the local
variable symbol_linkage has the same name as the enum class defined in
the same context:

      CXX    dwarf2read.o
    /home/smarchi/src/binutils-gdb/gdb/dwarf2read.c: In member function ‘dwarf2_per_cu_data* dw2_debug_names_iterator::next()’:
    /home/smarchi/src/binutils-gdb/gdb/dwarf2read.c:5850:22: error: ‘symbol_linkage’ is not a class, namespace, or enumeration
       } symbol_linkage = symbol_linkage::unknown;
                      ^

Rename the local variable to avoid this.

This problem was originally reported with the Netbsd builder on the
buildbot, which uses gcc 5.5, I believe.  I am not able to test it on
that builder right now, but chances are that the fix will work there
too.

gdb/ChangeLog:

* dwarf2read.c (dw2_debug_names_iterator::next): Rename local
variable symbol_linkage to symbol_linkage_.
gdb/ChangeLog
gdb/dwarf2read.c
This page took 0.027809 seconds and 4 git commands to generate.