From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 10674385408F; Sat, 10 Dec 2022 11:12:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 10674385408F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1670670778; bh=WuWQbzYsvyQvDiZvqIBLakdpZ/8GbJw371OtyTkhaAQ=; h=From:To:Subject:Date:From; b=EyYoULKR4DSQ2uLJt1Rkf8CEJ1hb5+w9mjYhRIjAws7dYu5G7ais1hSu+nFK41gA/ +lNXVmla/c9L1QGJZis5SXKgJ8ROHhJI0KccpI95Z/2J+VXrl/wuVoJHHZNyrFejQu +7u2Lvr7UwCWitBqGP4fXvxNF3tukpFN9Aoc7S6I= From: "hewillk at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/108046] New: The dot in the floating-point alternative form has wrong position Date: Sat, 10 Dec 2022 11:12:57 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: hewillk 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: 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=3D108046 Bug ID: 108046 Summary: The dot in the floating-point alternative form has wrong position Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: hewillk at gmail dot com Target Milestone: --- #include #include int main() { std::cout << std::format("{:#.0}\n", 10.); std::cout << std::format("{:#.1}\n", 10.); std::cout << std::format("{:#.0g}\n", 10.); } libstdc++ gives: 1e+01. 1e+01. 1e+01 But they should all be "1.e+01" https://godbolt.org/z/Y41ve6E7W=