public inbox for libstdc++-cvs@sourceware.org help / color / mirror / Atom feed
From: Jonathan Wakely <redi@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r12-3025] libstdc++: Don't check always-true condition [PR101965] Date: Thu, 19 Aug 2021 13:57:49 +0000 (GMT) [thread overview] Message-ID: <20210819135749.222753857007@sourceware.org> (raw) https://gcc.gnu.org/g:85a709595005b5df4b2ee9d81717a5df19c0023f commit r12-3025-g85a709595005b5df4b2ee9d81717a5df19c0023f Author: Jonathan Wakely <jwakely@redhat.com> Date: Thu Aug 19 13:05:54 2021 +0100 libstdc++: Don't check always-true condition [PR101965] Signed-off-by: Jonathan Wakely <jwakely@redhat.com> libstdc++-v3/ChangeLog: PR libstdc++/101965 * include/std/charconv (__to_chars_i): Remove redundant check. Diff: --- libstdc++-v3/include/std/charconv | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/libstdc++-v3/include/std/charconv b/libstdc++-v3/include/std/charconv index ac9c34d4601..2e368843fc9 100644 --- a/libstdc++-v3/include/std/charconv +++ b/libstdc++-v3/include/std/charconv @@ -336,12 +336,10 @@ namespace __detail *__first = '0'; return { __first + 1, errc{} }; } - - if _GLIBCXX17_CONSTEXPR (std::is_signed<_Tp>::value) + else if _GLIBCXX17_CONSTEXPR (std::is_signed<_Tp>::value) if (__value < 0) { - if (__builtin_expect(__first != __last, 1)) - *__first++ = '-'; + *__first++ = '-'; __unsigned_val = _Up(~__value) + _Up(1); }
reply other threads:[~2021-08-19 13:57 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20210819135749.222753857007@sourceware.org \ --to=redi@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ --cc=libstdc++-cvs@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).