From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id AD5633858408; Tue, 17 Oct 2023 16:50:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AD5633858408 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1697561444; bh=aC5K2c2FPI8ryJUGpUqn96d+1nYecZbxmbHtzKn4ZFQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=L8l98Q72HbexZFicUL8FuKBAbUo83EKPbNhBTdJj8DmomYp4oAMVXgDfYPUzHmAUs TUFz0Wp0vDFjSocE6FpYetW6f4Fwo8v1t01g/Jb4h4fbxhplNsuIXGWWQA3Tk/T8EH Hbe+2nn/i3yPfqpdWAK3gQuWcxx1JZ51JmERUtOA= From: "muecker at gwdg dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/111808] [C23] constexpr with excess precision Date: Tue, 17 Oct 2023 16:50:44 +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: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: muecker at gwdg dot de 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: 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=3D111808 --- Comment #6 from Martin Uecker --- Adding a note is a good idea, but it doesn't really solve the issue. The problem I see is that somebody developing on x86-64 does not get a warning = that the code is not strictly conforming and then it fails to build elsewhere.= =20=20 Ideally, there is an algorithm which can decide whether the result is exact= in all versions with same or higher precision or not. Otherwise, computing it with some higher precision and comparing the results would catch most probl= ems (but not all).=20 Alternatively, one could downgrade the error to warning. The code may then = be slightly wrong on i386 but at least the build does not fail.=