Add new GCC 9 warnings to warnings.m4

Message ID 20190510154228.22889-1-tromey@adacore.com
State New, archived
Headers

Commit Message

Tom Tromey May 10, 2019, 3:42 p.m. UTC
  GCC 9 has a few new warnings that aren't enabled in the gdb build by
default: -Wdeprecated-copy, -Winit-list-lifetime, and
-Wredundant-move.  This patch enables them all.

Tested by rebuilding with a new GCC (git master) on x86-64 Fedora 29.

gdb/ChangeLog
2019-05-10  Tom Tromey  <tromey@adacore.com>

	* configure: Rebuild.
	* warning.m4 (AM_GDB_WARNINGS): Add -Wdeprecated-copy,
	-Winit-list-lifetime, -Wredundant-move.

gdb/gdbserver/ChangeLog
2019-05-10  Tom Tromey  <tromey@adacore.com>

	* configure: Rebuild.
---
 gdb/ChangeLog           | 6 ++++++
 gdb/configure           | 5 ++++-
 gdb/gdbserver/ChangeLog | 4 ++++
 gdb/gdbserver/configure | 5 ++++-
 gdb/warning.m4          | 5 ++++-
 5 files changed, 22 insertions(+), 3 deletions(-)
  

Patch

diff --git a/gdb/configure b/gdb/configure
index 15a96afcca8..7f8143e1c99 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -15436,7 +15436,10 @@  build_warnings="-Wall -Wpointer-arith \
 -Wsuggest-override \
 -Wimplicit-fallthrough=3 \
 -Wduplicated-cond \
--Wshadow=local"
+-Wshadow=local \
+-Wdeprecated-copy \
+-Winit-list-lifetime \
+-Wredundant-move"
 
 case "${host}" in
   *-*-mingw32*)
diff --git a/gdb/gdbserver/configure b/gdb/gdbserver/configure
index 1ddbd6b27e0..8b6d33e8154 100755
--- a/gdb/gdbserver/configure
+++ b/gdb/gdbserver/configure
@@ -7271,7 +7271,10 @@  build_warnings="-Wall -Wpointer-arith \
 -Wsuggest-override \
 -Wimplicit-fallthrough=3 \
 -Wduplicated-cond \
--Wshadow=local"
+-Wshadow=local \
+-Wdeprecated-copy \
+-Winit-list-lifetime \
+-Wredundant-move"
 
 case "${host}" in
   *-*-mingw32*)
diff --git a/gdb/warning.m4 b/gdb/warning.m4
index 98eb4ce7878..e79e3e34b61 100644
--- a/gdb/warning.m4
+++ b/gdb/warning.m4
@@ -46,7 +46,10 @@  build_warnings="-Wall -Wpointer-arith \
 -Wsuggest-override \
 -Wimplicit-fallthrough=3 \
 -Wduplicated-cond \
--Wshadow=local"
+-Wshadow=local \
+-Wdeprecated-copy \
+-Winit-list-lifetime \
+-Wredundant-move"
 
 case "${host}" in
   *-*-mingw32*)