From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B5D9D385742F; Mon, 3 Oct 2022 14:29:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B5D9D385742F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1664807379; bh=RfFCQtHFVo4QT9mhgqxwYas8gclAEjYGNToJLqJjza4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=rck7EdWcckns7Glo7sRfo71S8vThxEIycS/JvNf8GPnYbKAn5yMsjPJa527GFdc6Z nyP++OJdiKRQEnDe6JPRervOVwVoCQG7Q6QQjJvhhQg2PhlJFOOFMpYM5CF7cdGoIQ f7K50jImP0ivWKouQK8VTe5YeYqHJXt+li9zj/z4= From: "jason at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/107126] -Wc++20-compat should complain about template-id in out of class definition for destructor Date: Mon, 03 Oct 2022 14:29:01 +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: 12.1.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jason 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: bug_status everconfirmed cc short_desc cf_reconfirmed_on 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D107126 Jason Merrill changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever confirmed|0 |1 CC| |jason at gcc dot gnu.org Summary|GCC accepts invalid out of |-Wc++20-compat should |class definition for |complain about template-id |destructor with C++17 |in out of class definition | |for destructor Last reconfirmed| |2022-10-03 --- Comment #8 from Jason Merrill --- As Jonathan documents, this was explicitly well-formed from DR1435 in C++11 until P1787 in C++23. It seems reasonable to also apply the P1787 change to C++20, treating it as a missing piece of the DR2237 resolution. It seems undesirable to apply it to C++17 as well. But it would be helpful for -Wc++20-compat to flag this compatibility issue Incidentally, we should probably also reduce the C++20 error to a pedwarn.=