From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6D17E385828E; Fri, 19 Jan 2024 18:47:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6D17E385828E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1705690060; bh=nOzplLgC1DRxWKkOIc8fBaoDEJnPxm3hPSI5LTXIxnc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=yMxllSXpSHjmKNtccS2LfHZMiLgiY3Do9LC2lIkg2fKbcKPNS0aAKnvL3f8HNkimp bFTefN+Z1h5OGfsld4t20NtUc3n7LABRLIvKqWcd5YJyyZwYmJcAJNI4PBSGS5Y0Xj Bp91adHc/EAnvnJnNKNW6MPfNe7yvonCAP9ZoTf0= From: "jason at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/95564] GCC rejects lambda expression with "noexcept(1+1)" Date: Fri, 19 Jan 2024 18:47:39 +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: jason at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: INVALID 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 resolution bug_status 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=3D95564 Jason Merrill changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jason at gcc dot gnu.org Resolution|--- |INVALID Status|UNCONFIRMED |RESOLVED --- Comment #4 from Jason Merrill --- (In reply to Jiang An from comment #3) > (In reply to Andrew Pinski from comment #2) > > GCC is inconsitent here. with static_assert and constexpr GCC accepts i= t (PR > > 87724) while rejects it for noexcept. >=20 > Currently narrowing conversions are still forbidden in noexcept and expli= cit > specifiers. >=20 > The inconsistency is acknowledged in C++23 (WG21-P1401R5), but it seems t= hat > 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 > constexpr in earlier modes. Narrowing conversions were fine in earlier standards, it was an accidental change that made them ill-formed, which was fixed. Clang now also rejects the testcase.=