From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id CD0893858D33; Sun, 8 Jan 2023 05:47:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CD0893858D33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1673156860; bh=7HywqP2197l4Ol0UsNW4bwEuaEV/qAfYXo3hlA45aAA=; h=From:To:Subject:Date:From; b=NMpLFpfz2P5eY+W8ghlmsylrjbqyqp1DGFp+i9yObtm9G0m2Tef23EhGnvbZ6eQAY OLGw1Wbp4KaRANLufjqrN+DqXHvohJxGWAVMZSrpDs97SaR9jWOukgY1GI8H0d3k4o jgsrGSAykqS7PDsUBABr9BTDmG84KjNTsDeSjvcQ= From: "yronglin777 at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/108333] New: [10.3/10.4/11/12/13/trunk Regression] The behavior of direct-non-list-initialized is not correct, parsing error on valid code Date: Sun, 08 Jan 2023 05:47:40 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: yronglin777 at gmail dot com X-Bugzilla-Status: UNCONFIRMED 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_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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=3D108333 Bug ID: 108333 Summary: [10.3/10.4/11/12/13/trunk Regression] The behavior of direct-non-list-initialized is not correct, parsing error on valid code Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: yronglin777 at gmail dot com Target Milestone: --- GCC parsing error on valid code: Compiler Explorer: https://godbolt.org/z/K6edrdTG5 (Thanks Nikolas Klauser) ``` struct NonCopyable { NonCopyable(int) {} NonCopyable(const NonCopyable&) =3D delete; }; struct S { S(int i) : val(NonCopyable{1}) {} [[no_unique_address]] NonCopyable val; }; struct T { T(int i) : val(NonCopyable{1}) {} NonCopyable val; }; ``` This code accept by GCC[9/10.1/10.2], clang and MSVC, but compile failed wi= th GCC[10.3/10.4/11/12/13/trunk], seems a regression.=