diff mbox

[BUILDROBOT] error: redefinition of typedef ‘record_line_ftype’ (was: [PATCH 3/6] DWARF Two Level Line Tables: check_line_address)

Message ID CADPb22SMqtn86MxgQP4E=f_EgcqA8n=8qpdEHyTheB5hqZAYZw@mail.gmail.com
State New
Headers show

Commit Message

Doug Evans May 28, 2015, 4:51 p.m. UTC
On Thu, May 28, 2015 at 6:58 AM, Maciej W. Rozycki <macro@linux-mips.org> wrote:
> On Thu, 28 May 2015, Jan-Benedict Glaw wrote:
>
>> > > This patch just factors out the checking of a line address
>> > > to improve the S/N ratio of the calling function.
>> > >
>> > > 2015-03-12  Doug Evans  <dje@google.com>
>> > >
>> > >         * dwarf2read.c (record_line_ftype): New typedef.
>> > >         (check_line_address): New function.
>> > >         (dwarf_decode_lines_1): Call it.
>> >
>> > Committed.
>>
>> Seems it's breaking, see eg. this xtensa-linux build
>> (http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=442962),
>> or hppa-linux
>> (http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=443000):
>>
>> [...]
>>  gcc -g -O2   -I. -I/home/jbglaw/repos/binutils_gdb/gdb -I/home/jbglaw/repos/binutils_gdb/gdb/common -I/home/jbglaw/repos/binutils_gdb/gdb/config -DLOCALEDIR="\"/home/jbglaw/build/hppa-linux/_install_/share/locale\"" -DHAVE_CONFIG_H -I/home/jbglaw/repos/binutils_gdb/gdb/../include/opcode -I/home/jbglaw/repos/binutils_gdb/gdb/../opcodes/.. -I/home/jbglaw/repos/binutils_gdb/gdb/../readline/.. -I/home/jbglaw/repos/binutils_gdb/gdb/../zlib -I../bfd -I/home/jbglaw/repos/binutils_gdb/gdb/../bfd -I/home/jbglaw/repos/binutils_gdb/gdb/../include -I../libdecnumber -I/home/jbglaw/repos/binutils_gdb/gdb/../libdecnumber  -I/home/jbglaw/repos/binutils_gdb/gdb/gnulib/import -Ibuild-gnulib/import   -DTUI=1  -I/usr/include/python2.6 -I/usr/include/python2.6 -Wall -Wpointer-arith -Wno-unused -Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts -Wempty-body -Wpointer-sign -Wmissing-prototypes -Wdeclaration-after-statement -Wmissing-parameter-type -Wold-style-declaration -Wold-style-definition -Wformat-nonliteral -Werror -c -o dwarf2read.o -MT dwarf2read.o -MMD -MP -MF .deps/dwarf2read.Tpo /home/jbglaw/repos/binutils_gdb/gdb/dwarf2read.c
>> /home/jbglaw/repos/binutils_gdb/gdb/dwarf2read.c:17480: error: redefinition of typedef ‘record_line_ftype’
>> /home/jbglaw/repos/binutils_gdb/gdb/buildsym.h:177: note: previous declaration of ‘record_line_ftype’ was here
>> make[1]: *** [dwarf2read.o] Error 1
>> make[1]: Leaving directory `/home/jbglaw/build/hppa-linux/build-gdb/gdb'
>> make: *** [all-gdb] Error 2
>>
>>   Probably just missed a small part of the patch which removed the
>> second definition?
>
>  Also mips-linux; any build probably.
>
>  The typedef in buildsym.h has to stay, it's already used elsewhere.
> It's the newly-added one in dwarf2read.c that has to go.  Both are
> identical anyway.

Fixed.

The build didn't fail for me so I didn't see this.
I then tried several pure gcc versions (can't trust distro gcc defaults).
I got a failure with 4.3.3 but not with 4.[6-9].x.

2015-05-28  Doug Evans  <dje@google.com>

        * dwarf2read.c (record_line_ftype): Remove, duplicate.

 typedef struct

Comments

Maciej W. Rozycki May 28, 2015, 5:27 p.m. UTC | #1
On Thu, 28 May 2015, Doug Evans wrote:

> >  The typedef in buildsym.h has to stay, it's already used elsewhere.
> > It's the newly-added one in dwarf2read.c that has to go.  Both are
> > identical anyway.
> 
> Fixed.

 Thanks!

> The build didn't fail for me so I didn't see this.
> I then tried several pure gcc versions (can't trust distro gcc defaults).
> I got a failure with 4.3.3 but not with 4.[6-9].x.

 The version I've been using is 6.0 head, so I guess in the quest for 
perfection GCC has become strictier since 4.9 here as well.  It might be 
worth trying 5.0, being a proper release rather than WIP.

 Offhand I can't tell if the complaint was legitimate or not.  I suspect 
it was, even though the redefinition merely repeated the original, but in 
any case the extra typedef was redundant.

  Maciej
diff mbox

Patch

diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 1ce616a..1e290c3 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -17475,11 +17475,6 @@  psymtab_include_file_name (const struct
line_header *lh, int file_index,
   return include_name;
 }

-/* Function to record a line number.  */
-
-typedef void (record_line_ftype) (struct subfile *subfile, int line,
-                                 CORE_ADDR pc);
-
 /* State machine to track the state of the line number program.  */