From patchwork Wed May 29 14:17:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 32895 Received: (qmail 86327 invoked by alias); 29 May 2019 14:17:55 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 86315 invoked by uid 89); 29 May 2019 14:17:55 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-23.5 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_NUMSUBJECT, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy=kevin X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 29 May 2019 14:17:53 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id B3FB0117E12; Wed, 29 May 2019 10:17:51 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id NlW7ACZ4HBuc; Wed, 29 May 2019 10:17:51 -0400 (EDT) Received: from murgatroyd (174-29-48-168.hlrn.qwest.net [174.29.48.168]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by rock.gnat.com (Postfix) with ESMTPSA id 4E518117E07; Wed, 29 May 2019 10:17:51 -0400 (EDT) From: Tom Tromey To: Tom Tromey Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] Add new GCC 9 warnings to warnings.m4 References: <20190510154228.22889-1-tromey@adacore.com> Date: Wed, 29 May 2019 08:17:50 -0600 In-Reply-To: <20190510154228.22889-1-tromey@adacore.com> (Tom Tromey's message of "Fri, 10 May 2019 09:42:28 -0600") Message-ID: <877ea95oq9.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 >>>>> "Tom" == Tom Tromey 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 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 * 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. diff --git a/gdb/ChangeLog b/gdb/ChangeLog index f122f5b21f5..e67c92b2054 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-28 Tom Tromey * ada-lang.c (ada_remove_Xbn_suffix) diff --git a/gdb/configure b/gdb/configure index 15a96afcca8..ff0971bc287 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 2e98158aa6f..e15395d6954 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 1ddbd6b27e0..5ffdeb0816b 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 eba7a931f46..621f69aa40f 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 98eb4ce7878..c9e64a1836a 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*)