Add new GCC 9 warnings to warnings.m4
Commit Message
>>>>> "Tom" == Tom Tromey <tromey@adacore.com> writes:
Tom> GCC 9 has a few new warnings that aren't enabled in the gdb build by
Tom> default: -Wdeprecated-copy, -Winit-list-lifetime, and
Tom> -Wredundant-move. This patch enables them all.
I was going to land this today, but when reading the GCC 9 changes page:
https://gcc.gnu.org/gcc-9/changes.html
... I noticed that -Winit-list-lifetime is enabled by default, and also
that I'd missed -Wdeprecated-copy-dtor before.
Here is v2 of the patch, which makes the appropriate changes. In this
case one patch to the code was needed.
Tom
commit 260ad5fd3217d3df22c9771842f8863484f74e0e
Author: Tom Tromey <tromey@adacore.com>
Date: Fri May 10 09:25:19 2019 -0600
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 <tromey@adacore.com>
* 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 <tromey@adacore.com>
* configure: Rebuild.
Comments
On 5/29/19 3:17 PM, Tom Tromey wrote:
>>>>>> "Tom" == Tom Tromey <tromey@adacore.com> writes:
>
> Tom> GCC 9 has a few new warnings that aren't enabled in the gdb build by
> Tom> default: -Wdeprecated-copy, -Winit-list-lifetime, and
> Tom> -Wredundant-move. This patch enables them all.
>
> I was going to land this today, but when reading the GCC 9 changes page:
>
> https://gcc.gnu.org/gcc-9/changes.html
>
> ... I noticed that -Winit-list-lifetime is enabled by default, and also
> that I'd missed -Wdeprecated-copy-dtor before.
>
> Here is v2 of the patch, which makes the appropriate changes. In this
> case one patch to the code was needed.
Looks fine.
Thanks,
Pedro Alves
@@ -1,3 +1,10 @@
+2019-05-29 Tom Tromey <tromey@adacore.com>
+
+ * 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-28 Tom Tromey <tromey@adacore.com>
* ada-lang.c (ada_remove_Xbn_suffix)
@@ -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*)
@@ -1,3 +1,7 @@
+2019-05-29 Tom Tromey <tromey@adacore.com>
+
+ * configure: Rebuild.
+
2019-05-06 Kevin Buettner <kevinb@redhat.com>
* linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
@@ -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*)
@@ -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;
@@ -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*)