From: Eli Zaretskii <eliz@gnu.org>
To: gdb-patches@sourceware.org
Subject: Re: [ANNOUNCEMENT] GDB 8.1 release branch created!
Date: Tue, 16 Jan 2018 17:31:00 -0000 [thread overview]
Message-ID: <83h8rlyakm.fsf@gnu.org> (raw)
In-Reply-To: <announce.20180105041805.3FC35808E9@joel.gnat.com> (message from Joel Brobecker on Fri, 5 Jan 2018 08:18:05 +0400 (+04))
> From: Joel Brobecker <brobecker@adacore.com>
> Date: Fri, 5 Jan 2018 08:18:05 +0400 (+04)
>
> A quick message to announce that the GDB 8.1 branch has just been created.
>
> The prerelease snapshots will be available at:
>
> ftp://sourceware.org/pub/gdb/snapshots/branch/gdb.tar.xz
> ftp://sourceware.org/pub/gdb/snapshots/branch/gdb.tar.gz
I've built this pre-release with mingw.org's MinGW, and found a few
problems.
The most serious one is the following compilation error:
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 -fno-strict-aliasing -DNDEBUG -fwrapv -c -o python/py-arch.o -MT python/py-arch.o -MMD -MP -MF python/.deps/py-arch.Tpo python/py-arch.c
In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
from build-gnulib/import/math.h:27,
from d:/usr/Python26/include/pyport.h:235,
from d:/usr/Python26/include/Python.h:58,
from python/python-internal.h:94,
from python/py-arch.c:24:
d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
using ::hypot;
^~~~~
Makefile:1618: recipe for target `python/py-arch.o' failed
Googling suggests the following solution; is it okay to push this
(with the necessary logs and after doing the "paperwork" required for
branch changes)? Or does someone have better ideas? (Does this work
in MinGW64?)
--- gdb/python/python-internal.h~0 2018-01-12 05:31:04.000000000 +0200
+++ gdb/python/python-internal.h 2018-01-16 08:56:10.717759900 +0200
@@ -85,6 +85,12 @@
#define HAVE_SNPRINTF 1
#endif
+/* Another kludge to avoid compilation errors because MinGW defines
+ 'hypot' to '_hypot', but the C++ headers says "using ::hypot". */
+#if defined(__MINGW32__) && defined(__cplusplus)
+# define _hypot hypot
+#endif
+
/* Request clean size types from Python. */
#define PY_SSIZE_T_CLEAN
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 cli/cli-cmds.o -MT cli/cli-cmds.o -MMD -MP -MF cli/.deps/cli-cmds.Tpo cli/cli-cmds.c
cli/cli-cmds.c: In function 'void complete_command(const char*, int)':
cli/cli-cmds.c:277:71: warning: 'word' may be used uninitialized in this function [-Wmaybe-uninitialized]
= tracker->build_completion_result (word, word - arg, strlen (arg));
^
cli/cli-cmds.c:277:71: warning: 'tracker' may be used uninitialized in this function [-Wmaybe-uninitialized]
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 breakpoint.o -MT breakpoint.o -MMD -MP -MF ./.deps/breakpoint.Tpo breakpoint.c
breakpoint.c: In function 'void check_status_watchpoint(bpstat)':
breakpoint.c:5079:4: warning: 'e' may be used uninitialized in this function [-Wmaybe-uninitialized]
switch (e)
^~~~~~
breakpoint.c:5056:20: note: 'e' was declared here
wp_check_result e;
^
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;
^~~~~~~~~~
next parent reply other threads:[~2018-01-16 17:31 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <announce.20180105041805.3FC35808E9@joel.gnat.com>
2018-01-16 17:31 ` Eli Zaretskii [this message]
2018-01-16 19:02 ` Sergio Durigan Junior
2018-01-16 19:46 ` [PATCH] Fix warning on gdb/compile/compile.c (C++-ify "triplet_rx") Sergio Durigan Junior
2018-01-17 15:33 ` Eli Zaretskii
2018-01-17 17:17 ` Simon Marchi
2018-01-17 23:07 ` Sergio Durigan Junior
2018-01-17 23:42 ` Simon Marchi
2018-01-17 23:48 ` Sergio Durigan Junior
2018-01-16 20:32 ` [PATCH] Fix unitialized warning on gdb/typeprint.c:whatis_exp Sergio Durigan Junior
2018-01-17 15:34 ` Eli Zaretskii
2018-01-17 16:48 ` Pedro Alves
2018-01-17 18:03 ` Sergio Durigan Junior
2018-01-20 1:03 ` [PATCH] Fix segfault when using 'set print object on' + whatis <struct> Sergio Durigan Junior
2018-01-22 17:42 ` [PATCH v2] Fix segfault when using 'set print object on' + whatis <struct> (Re: [PATCH] Fix segfault when using 'set print object on' + whatis <struct>) Pedro Alves
2018-01-22 18:04 ` Sergio Durigan Junior
2018-01-22 19:53 ` Pedro Alves
2018-01-22 20:11 ` Sergio Durigan Junior
2018-01-16 20:36 ` [ANNOUNCEMENT] GDB 8.1 release branch created! Sergio Durigan Junior
2018-01-17 3:36 ` Eli Zaretskii
2018-01-17 16:46 ` Sergio Durigan Junior
2018-01-17 11:04 ` Pedro Alves
2018-01-17 16:38 ` Sergio Durigan Junior
2018-01-17 16:46 ` Eli Zaretskii
2018-01-17 16:50 ` Pedro Alves
2018-01-17 18:21 ` Eli Zaretskii
2018-01-18 15:53 ` Eli Zaretskii
2018-01-25 16:58 ` Eli Zaretskii
2018-01-26 14:18 ` Eli Zaretskii
2018-01-26 15:37 ` Simon Marchi
2018-01-26 18:53 ` Eli Zaretskii
2018-01-27 16:42 ` Eli Zaretskii
2018-02-01 15:12 ` Yao Qi
2018-02-01 16:27 ` Eli Zaretskii
2018-02-01 16:51 ` Yao Qi
2018-02-01 17:33 ` Eli Zaretskii
2018-02-01 21:32 ` Yao Qi
2018-02-02 15:23 ` Eli Zaretskii
2018-02-02 15:53 ` Joel Brobecker
2018-02-02 16:27 ` Simon Marchi
2018-02-02 17:42 ` Joseph Myers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83h8rlyakm.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox