This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [ANNOUNCEMENT] GDB 8.1 release branch created!
- From: Sergio Durigan Junior <sergiodj at redhat dot com>
- To: Eli Zaretskii <eliz at gnu dot org>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 16 Jan 2018 14:02:37 -0500
- Subject: Re: [ANNOUNCEMENT] GDB 8.1 release branch created!
- Authentication-results: sourceware.org; auth=none
- References: <announce.20180105041805.3FC35808E9@joel.gnat.com> <83h8rlyakm.fsf@gnu.org>
On Tuesday, January 16 2018, Eli Zaretskii wrote:
> I've built this pre-release with mingw.org's MinGW, and found a few
> problems.
[...]
> The other problems I saw are compilation warnings, see below. Some of
> them sound like GCC doesn't understand our TRY/CATCH blocks, but others
> seem like real problems, at least from the POV of a naïve reader such
> as myself. I wonder how come others don't see these warnings, and why
> weren't they fixed during development, when we use -Werror. Here are
> the warnings I saw:
>
[...]
> g++ -x c++ -O2 -gdwarf-4 -g3 -I. -I. -I./common -I./config -DLOCALEDIR="\"d:/usr/share/locale\"" -DHAVE_CONFIG_H -I./../include/opcode -I./../opcodes/.. -I./../readline/.. -I../bfd -I./../bfd -I./../include -I../libdecnumber -I./../libdecnumber -I./gnulib/import -Ibuild-gnulib/import -DTUI=1 -Id:/usr/include -Id:/usr/include/guile/2.0 -Id:/usr/include -Id:/usr/Python26/include -Id:/usr/Python26/include -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-narrowing -Wno-error=maybe-uninitialized -Wno-format -c -o infrun.o -MT infrun.o -MMD -MP -MF ./.deps/infrun.Tpo infrun.c
> In file included from infrun.c:26:0:
> inferior.h: In function 'void handle_vfork_child_exec_or_exit(int)':
> inferior.h:537:39: warning: '*((void*)(& maybe_restore_inferior)+20).scoped_restore_current_inferior::m_saved_inf' may be used uninitialized in this function [-Wmaybe-uninitialized]
> { set_current_inferior (m_saved_inf); }
> ^
> infrun.c:927:6: note: '*((void*)(& maybe_restore_inferior)+20).scoped_restore_current_inferior::m_saved_inf' was declared here
> maybe_restore_inferior;
> ^~~~~~~~~~~~~~~~~~~~~~
> In file included from inferior.h:48:0,
> from infrun.c:26:
> progspace.h:285:47: warning: '*((void*)(& maybe_restore_inferior)+16).scoped_restore_current_program_space::m_saved_pspace' may be used uninitialized in this function [-Wmaybe-uninitialized]
> { set_current_program_space (m_saved_pspace); }
> ^
> infrun.c:927:6: note: '*((void*)(& maybe_restore_inferior)+16).scoped_restore_current_program_space::m_saved_pspace' was declared here
> maybe_restore_inferior;
> ^~~~~~~~~~~~~~~~~~~~~~
>
> g++ -x c++ -O2 -gdwarf-4 -g3 -I. -I. -I./common -I./config -DLOCALEDIR="\"d:/usr/share/locale\"" -DHAVE_CONFIG_H -I./../include/opcode -I./../opcodes/.. -I./../readline/.. -I../bfd -I./../bfd -I./../include -I../libdecnumber -I./../libdecnumber -I./gnulib/import -Ibuild-gnulib/import -DTUI=1 -Id:/usr/include -Id:/usr/include/guile/2.0 -Id:/usr/include -Id:/usr/Python26/include -Id:/usr/Python26/include -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-narrowing -Wno-error=maybe-uninitialized -Wno-format -c -o typeprint.o -MT typeprint.o -MMD -MP -MF ./.deps/
> typeprint.Tpo typeprint.c
> typeprint.c: In function 'void whatis_exp(const char*, int)':
> typeprint.c:515:60: warning: 'val' may be used uninitialized in this function [-Wmaybe-uninitialized]
> real_type = value_rtti_type (val, &full, &top, &using_enc);
> ^
>
> g++ -x c++ -O2 -gdwarf-4 -g3 -I. -I. -I./common -I./config -DLOCALEDIR="\"d:/usr/share/locale\"" -DHAVE_CONFIG_H -I./../include/opcode -I./../opcodes/.. -I./../readline/.. -I../bfd -I./../bfd -I./../include -I../libdecnumber -I./../libdecnumber -I./gnulib/import -Ibuild-gnulib/import -DTUI=1 -Id:/usr/include -Id:/usr/include/guile/2.0 -Id:/usr/include -Id:/usr/Python26/include -Id:/usr/Python26/include -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-narrowing -Wno-error=maybe-uninitialized -Wno-format -c -o compile/compile.o -MT compile/compile.o -MMD -MP -MF compile/.deps/compile.Tpo compile/compile.c
> compile/compile.c: In function 'void eval_compile_command(command_line*, const char*, compile_i_scope_types, void*)':
> compile/compile.c:549:20: warning: 'triplet_rx' may be used uninitialized in this function [-Wmaybe-uninitialized]
> argc, argv);
> ^
> compile/compile.c:466:9: note: 'triplet_rx' was declared here
> char *triplet_rx;
> ^~~~~~~~~~
FWIW, I've seen these warnings when preparing a Fedora GDB release.
I'll take a look at them.
--
Sergio
GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36
Please send encrypted e-mail if possible
http://sergiodj.net/