From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 052A53986436; Sat, 17 Sep 2022 12:29:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 052A53986436 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1663417752; bh=KItpy+2Y7zR+cMRtBAjGSxjL3Dd02H7MauPnAXB0HQo=; h=From:To:Subject:Date:In-Reply-To:References:From; b=uYFiBsvsmupXO5Xq3RwHI4JBFygMvmxfWNkg9VzExA4NrmH3YW/gP3Mw6U42HgUsX 6KLvmvHcRNKKplMjPwOAGCEB+COijF+cZ7xuZ5cxYECDLsPByAjRFRCYtp8gKdLfT9 mlvIBglcrTGfFOdttA1BuKYj+srOtkxV+unLHSoU= 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:29:11 +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: 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 --- Comment #10 from Jason Merrill --- (In reply to Aldy Hernandez from comment #9) > So...could we keep doing what we're doing for non side-effect code, and o= nly > do the outline function for side-effect stuff? Or is that too much to as= k? Yes, that's what Jakub proposed in comment #4. > But wait a minute, is calling a non-const function from [[assume]] even > allowed? Yep, that's the tricky part. Of course, as functions get more complicated,= the compiler being able to do anything useful with it gets less likely. It see= ms entirely reasonable to start with calls to functions that the compiler knows are const even if they aren't declared with the attribute.=