This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v2 4/8] DWARF-5 basic functionality
On Wed, Feb 22 2017, Jan Kratochvil wrote:
> On Wed, 22 Feb 2017 18:38:11 +0100, Andreas Arnez wrote:
>> On Wed, Feb 22 2017, Jan Kratochvil wrote:
>>
>> > What compiler/version/options do you use? I have tried now
>> > gcc-4.8.5-11.el7.x86_64
>> > CFLAGS=-O3 CXXFLAGS=-O3 ./configure;make
>>
>> I saw the warning with an upstream GCC I recently built myself for
>> s390x. Today I retried with a fresh version from GCC git, with the same
>> result: gcc (GCC) 7.0.1 20170222 (experimental)
>
> g++ (GCC) 7.0.1 20170218 (experimental)
> ~/redhat/gcchead-root/bin/g++ -m64 -g3 -pipe -Wall -fexceptions
> -fstack-protector-strong --param=ssp-buffer-size=4
> -fno-diagnostics-show-caret -I. -I. -I./common -I./config
> -DLOCALEDIR="\"/usr/local/share/locale\"" -DHAVE_CONFIG_H
> -I./../include/opcode -I./../opcodes/.. -I./../readline/.. -I./../zlib
> -I../bfd -I./../bfd -I./../include -I../libdecnumber -I./../libdecnumber
> -I./gnulib/import -Ibuild-gnulib/import -DTUI=1 -I/usr/include/python3.5m
> -I/usr/include/python3.5m -Wall -Wpointer-arith -Wno-unused -Wunused-value
> -Wunused-function -Wno-switch -Wno-char-subscripts -Wempty-body
> -Wunused-but-set-parameter -Wunused-but-set-variable -Wno-sign-compare
> -Wno-write-strings -Wno-narrowing -Wformat-nonliteral -Werror -c -o
> dwarf2read.o -MT dwarf2read.o -MMD -MP -MF .deps/dwarf2read.Tpo
> dwarf2read.c -O3
>
> But on x86_64. I can try building trunk GCC on s390x but do you
> really have the warnings unreproducible on x86_64?
I don't know why you don't see the warnings. I had not tested with
upstream GCC on x86_64 before. Now I have, and the same warnings appear
there. Both on s390x and x86_64 it basically looks the same:
g++ -O3 -g -I. -I. -I./common -I./config
-DLOCALEDIR="\"/home/arnez/install/share/locale\"" -DHAVE_CONFIG_H
-I./../include/opcode -I./../opcodes/.. -I./../readline/.. -I./../zlib
-I../bfd -I./../bfd -I./../include -I../libdecnumber -I./../libdecnumber
-I./gnulib/import -Ibuild-gnulib/import -DTUI=1 -I/usr/include/python2.7
-I/usr/include/python2.7 -Wall -Wpointer-arith -Wno-unused
-Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts
-Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable
-Wno-sign-compare -Wno-write-strings -Wno-narrowing -Wformat-nonliteral
-c -o dwarf2read.o -MT dwarf2read.o -MMD -MP -MF .deps/dwarf2read.Tpo
dwarf2read.c
dwarf2read.c: In function ‘void create_debug_type_hash_table(dwo_file*,
dwarf2_section_info*, htab*&, rcuh_kind)’: dwarf2read.c:4766:30:
warning: ‘header.comp_unit_head::type_offset_in_tu.cu_offset::cu_off’
may be used uninitialized in this function [-Wmaybe-uninitialized]
dwo_tu->type_offset_in_tu = header.type_offset_in_tu;
~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
dwarf2read.c:4819:21: warning: ‘header.comp_unit_head::signature’ may be
used uninitialized in this function [-Wmaybe-uninitialized]
fprintf_unfiltered (gdb_stdlog, " offset 0x%x, signature %s\n",
~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
offset.sect_off,
~~~~~~~~~~~~~~~~
hex_string (header.signature));
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
Andreas