From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 766103858406; Thu, 9 Dec 2021 01:19:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 766103858406 From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: =?UTF-8?B?W0J1ZyBjKysvNjkzNzNdIEdDQyBlbWl0cyBpbmNvcnJlY3Qgd2Fy?= =?UTF-8?B?bmluZyB0aGF0ICJleGNlcHRpb24gb2YgdHlwZSDigJh2b2lkICgqKSgp4oCZ?= =?UTF-8?B?IHdpbGwgYmUgY2F1Z2h0IGJ5IGVhcmxpZXIgaGFuZGxlciBmb3IgJ3ZvaWQq?= =?UTF-8?B?JyI=?= Date: Thu, 09 Dec 2021 01:19:28 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 6.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Dec 2021 01:19:28 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D69373 --- Comment #3 from Andrew Pinski --- I think the following patch fixes the warning: apinski@xeond:~/src/upstream-gcc/gcc/gcc/cp$ git diff except.c diff --git a/gcc/cp/except.c b/gcc/cp/except.c index a8acbc4b7b2..28d7810e182 100644 --- a/gcc/cp/except.c +++ b/gcc/cp/except.c @@ -949,7 +949,8 @@ can_convert_eh (tree to, tree from) if (! at_least_as_qualified_p (to, from)) return false; - if (VOID_TYPE_P (to)) + if (VOID_TYPE_P (to) + && TREE_CODE (TREE_TYPE (from)) !=3D FUNCTION_TYPE) return true; /* Else fall through. */=