From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 04DD83853562; Sat, 17 Sep 2022 12:09:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 04DD83853562 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1663416591; bh=Y+opnqE9fqhRfiJalQuAu9MDCei2KGQv8AmIseEAhNk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Kl1rKI2REZ5cfKpcASOX+IWIqaTZzoYIPh+kTBq5Vi2bEFzVFglFlLZ8TmUDwHyI2 QqeizA/1/cKfrhDmECpoAzF9IUWJaCuy29u4vUqxdyvLcLWPDFaKeP54THaDbaOkFJ wnGAyOsFly87JX597GYSXD6RvCapasK+A2Zc9hYo= From: "jason at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/106654] [C++23] P1774 - Portable assumptions Date: Sat, 17 Sep 2022 12:09:50 +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: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jason at gcc dot gnu.org X-Bugzilla-Status: NEW 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: everconfirmed cf_reconfirmed_on 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=3D106654 Jason Merrill changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Last reconfirmed| |2022-09-17 Status|UNCONFIRMED |NEW --- Comment #8 from Jason Merrill --- (In reply to Aldy Hernandez from comment #7) > Silly question, why can't you expand the [[assume]] construct into: >=20 > if (x > 5) > __builtin_unreachable (); >=20 > ...like we always have. Then no changes are needed to ranger :). Or does > this have to do with the whole side-effect thing? Exactly. For expressions with no side-effects, we can do that. For, say, a call to a non-const function, we need to avoid actually emitting the call.=