From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BA0B63858C50; Fri, 12 Apr 2024 18:21:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BA0B63858C50 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1712946092; bh=DQtOGEk6u9J7Zgly6+HipJH3oae9jn/9dOOLIWQ3pQk=; h=From:To:Subject:Date:From; b=Am7R2ASalFRpLmC4t3RU2QhQtV04wN8/ouHtAm+UTbQzJpiYF/wSwc1LVH8GOCfth c47SqN6Dz6JCiz7520Bpy2y2d6f6xcNTjaWHJIIfAnGygRUgrjR1c8sqS6wezqzFux BsvEzZuoOTWV3dzIK77TCJjWdtMew247orqjrxho= From: "mpolacek at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/114705] New: [DR 2763] Warn about [[noreturn]] that returns during constant evaluation Date: Fri, 12 Apr 2024 18:21:31 +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: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: mpolacek at gcc dot gnu.org 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=3D114705 Bug ID: 114705 Summary: [DR 2763] Warn about [[noreturn]] that returns during constant evaluation Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: mpolacek at gcc dot gnu.org Target Milestone: --- clang++ warns here: ``` [[noreturn]] constexpr void f() {} constexpr int x =3D (f(), 0); ``` l.C:1:36: warning: function declared 'noreturn' should not return [-Winvalid-noreturn] 1 | [[noreturn]] constexpr void f() {} | ^ but we don't. Related to https://cplusplus.github.io/CWG/issues/2763.html=