From 33a6bc350f5b4f03d586ba9d32667b6fea1dce4a Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Fri, 10 May 2019 09:25:19 -0600 Subject: [PATCH] Add new GCC 9 warnings to warnings.m4 GCC 9 has a few new warnings that aren't enabled in the gdb build by default: -Wdeprecated-copy, -Wdeprecated-copy-dtor, 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-29 Tom Tromey * inflow.c (struct terminal_info): Add default operator=. * configure: Rebuild. * warning.m4 (AM_GDB_WARNINGS): Add -Wdeprecated-copy, -Wdeprecated-copy-dtor, -Wredundant-move. gdb/gdbserver/ChangeLog 2019-05-29 Tom Tromey * configure: Rebuild. --- gdb/ChangeLog | 7 +++++++ gdb/configure | 5 ++++- gdb/gdbserver/ChangeLog | 4 ++++ gdb/gdbserver/configure | 5 ++++- gdb/inflow.c | 2 ++ gdb/warning.m4 | 5 ++++- 6 files changed, 25 insertions(+), 3 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 16c1d0c844..c105fb7b0a 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,10 @@ +2019-05-29 Tom Tromey + + * inflow.c (struct terminal_info): Add default operator=. + * configure: Rebuild. + * warning.m4 (AM_GDB_WARNINGS): Add -Wdeprecated-copy, + -Wdeprecated-copy-dtor, -Wredundant-move. + 2019-05-29 Tom Tromey * NEWS: Add entry. diff --git a/gdb/configure b/gdb/configure index 15a96afcca..ff0971bc28 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 \ +-Wdeprecated-copy-dtor \ +-Wredundant-move" case "${host}" in *-*-mingw32*) diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index 2e98158aa6..e15395d695 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,7 @@ +2019-05-29 Tom Tromey + + * configure: Rebuild. + 2019-05-06 Kevin Buettner * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit diff --git a/gdb/gdbserver/configure b/gdb/gdbserver/configure index 1ddbd6b27e..5ffdeb0816 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 \ +-Wdeprecated-copy-dtor \ +-Wredundant-move" case "${host}" in *-*-mingw32*) diff --git a/gdb/inflow.c b/gdb/inflow.c index eba7a931f4..621f69aa40 100644 --- a/gdb/inflow.c +++ b/gdb/inflow.c @@ -61,6 +61,8 @@ struct terminal_info terminal_info () = default; ~terminal_info (); + terminal_info &operator= (const terminal_info &) = default; + /* The name of the tty (from the `tty' command) that we gave to the inferior when it was started. */ char *run_terminal = nullptr; diff --git a/gdb/warning.m4 b/gdb/warning.m4 index 98eb4ce787..c9e64a1836 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 \ +-Wdeprecated-copy-dtor \ +-Wredundant-move" case "${host}" in *-*-mingw32*) -- 2.34.1