public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/115668] Cannot format chrono::duration<unsigned> Date: Fri, 28 Jun 2024 19:39:25 +0000 [thread overview] Message-ID: <bug-115668-4-cYi6A4ClRd@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-115668-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115668 --- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-14 branch has been updated by Jonathan Wakely <redi@gcc.gnu.org>: https://gcc.gnu.org/g:d5e352addf4c17d28bcada42409881089c5d8088 commit r14-10356-gd5e352addf4c17d28bcada42409881089c5d8088 Author: Jonathan Wakely <jwakely@redhat.com> Date: Wed Jun 26 20:22:54 2024 +0100 libstdc++: Fix std::format for chrono::duration with unsigned rep [PR115668] Using std::chrono::abs is only valid if numeric_limits<rep>::is_signed is true, so using it unconditionally made it ill-formed to format a duration with an unsigned rep. The duration formatter might as well negate the duration itself instead of using chrono::abs, because it already needs to check for a negative value. libstdc++-v3/ChangeLog: PR libstdc++/115668 * include/bits/chrono_io.h (formatter<duration<R,P, C>::format): Do not use chrono::abs. * testsuite/20_util/duration/io.cc: Check formatting a duration with unsigned rep. (cherry picked from commit dafa750c8a6f0a088677871bfaad054881737ab1)
next prev parent reply other threads:[~2024-06-28 19:39 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-06-26 17:23 [Bug libstdc++/115668] New: " redi at gcc dot gnu.org 2024-06-26 17:30 ` [Bug libstdc++/115668] " redi at gcc dot gnu.org 2024-06-26 17:31 ` redi at gcc dot gnu.org 2024-06-27 8:48 ` cvs-commit at gcc dot gnu.org 2024-06-28 19:39 ` cvs-commit at gcc dot gnu.org [this message] 2024-06-28 19:39 ` cvs-commit at gcc dot gnu.org 2024-06-28 19:40 ` redi at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-115668-4-cYi6A4ClRd@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).