From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D62C13858D37; Thu, 29 Jun 2023 11:02:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D62C13858D37 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1688036550; bh=nf45emqxT48kuqiv2LZAZcdz9jiWQZ0ktqIOg73Dfh4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=eByLxH79c1xUbLnAi9Xo8LKDt+sRx33g4EizkqLLUzHBJ3r1WjJx+kkwxbccvIsgz FAdSR50HdclQAXllUic9Y8uEhDJMlYEetVLMOPDKs7py3i1G/1pkfR8QUcC3XO8wGN 9jiEKjMSzvtlKLQgKCklISA7n9FLGi4xn3r1IyIM= From: "pdimov at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/110476] constexpr floating point regression with -std=c++XX Date: Thu, 29 Jun 2023 11:02:30 +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: 13.1.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: pdimov 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: 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=3D110476 --- Comment #2 from Peter Dimov --- Discussion of FLT_EVAL_METHOD notwithstanding, I think that this behavior is not allowed by https://eel.is/c++draft/lex.fcon#3. "If the scaled value is not in the range of representable values for its ty= pe, the program is ill-formed. Otherwise, the value of a floating-point-literal= is the scaled value if representable, else the larger or smaller representable value nearest the scaled value, chosen in an implementation-defined manner." I don't see any license here for the value of 3.14f to be 3.14L.=