From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 503D43851C08; Sat, 6 Jun 2020 16:18:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 503D43851C08 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1591460338; bh=rd1IidfEmCM4OMc9fGTkNnpJIserp8yNT5nAG9WO/iM=; h=From:To:Subject:Date:From; b=RhTKCB704VaZ4XpAeu67KjWDeVmHbc5KgAH04rJhHj275sg5D5PArPLDQt1nzeOmb tN+WMp+IFwFgBEB/FMPw3Tk5t7v2Lnv/94ANtXm6oHIqMBIlI2cyFug2TS14ivUyIv OIyCTnAB7U5FBy0OIoQQC3Rh93FMHegjkJi/QIqQ= From: "haoxintu at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/95564] New: GCC rejects lambda expression with "noexcept(1+1)" Date: Sat, 06 Jun 2020 16:18:58 +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: 11.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: haoxintu 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 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: Sat, 06 Jun 2020 16:18:58 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D95564 Bug ID: 95564 Summary: GCC rejects lambda expression with "noexcept(1+1)" Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: haoxintu at gmail dot com Target Milestone: --- This code test.cc int main(){ auto a =3D [ & ] (...) noexcept(1+1) {}; return 0; } $g++-trunk test.cc test.cc:2:38: error: narrowing conversion of '2' from 'int' to 'bool' [-Wnarrowing] 2 | auto a =3D [ & ] (...) noexcept(1+1) {}; |=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20 GCC fails to compile it, while clang, icc, or msvc accept it.=