From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 24E043858D35; Thu, 16 Dec 2021 10:17:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 24E043858D35 From: "de34 at live dot cn" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/95564] GCC rejects lambda expression with "noexcept(1+1)" Date: Thu, 16 Dec 2021 10:17:19 +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: 11.0 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: de34 at live dot cn 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: cc 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, 16 Dec 2021 10:17:19 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D95564 Jiang An changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |de34 at live dot cn --- Comment #3 from Jiang An --- (In reply to Andrew Pinski from comment #2) > GCC is inconsitent here. with static_assert and constexpr GCC accepts it = (PR > 87724) while rejects it for noexcept. Currently narrowing conversions are still forbidden in noexcept and explicit specifiers. The inconsistency is acknowledged in C++23 (WG21-P1401R5), but it seems that P1401 is not a DR, as the related CWG 2320 is closed as extension. I don't = know whether we should reject narrowing conversions in static_assert/if constexp= r in earlier modes.=