From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 44B553858C35; Tue, 17 Oct 2023 21:45:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 44B553858C35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1697579132; bh=L274uZMBbUCW8My2CESbZ+vXXw47OQRxdtyiEvDtOwA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=x4iBknaGbLJE18GNjPP5EUQipeIJZ2CqEY89yGzR7VYVBGon3gTFUVIbQ1CkNZPqZ 5y6NqkwNFMZILFuxsshZsER8Txj2BEedhwqb+7tzzGswtgI5nbdxc7lRsjyq0PFbE/ T3lUwlhREW+swrSdA5eZvJsr0j8n9lYWGVREUeVo= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/111840] =delete("can have a reason")? Date: Tue, 17 Oct 2023 21:45:31 +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: 14.0 X-Bugzilla-Keywords: accepts-invalid X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: mpolacek 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D111840 --- Comment #3 from CVS Commits --- The trunk branch has been updated by Marek Polacek : https://gcc.gnu.org/g:1fbb7d75abbb050f790d8b43422602ee4b152608 commit r14-4694-g1fbb7d75abbb050f790d8b43422602ee4b152608 Author: Marek Polacek Date: Tue Oct 17 16:11:11 2023 -0400 c++: accepts-invalid with =3Ddelete("") [PR111840] r6-2367 added a DECL_INITIAL check to cp_parser_simple_declaration so that we don't emit multiple errors in g++.dg/parse/error57.C. But that means we don't diagnose int f1() =3D delete("george_crumb"); anymore, because fn decls often have error_mark_node in their DECL_INITIAL. (The code may be allowed one day via https://wg21.link/P2573R0.) I was hoping I could use cp_parser_error_occurred but that would regress error57.C. PR c++/111840 gcc/cp/ChangeLog: * parser.cc (cp_parser_simple_declaration): Do cp_parser_error for FUNCTION_DECLs. gcc/testsuite/ChangeLog: * g++.dg/parse/error65.C: New test.=