[gcc r11-8922] libstdc++: Don't check always-true condition [PR101965]
Jonathan Wakely
redi@gcc.gnu.org
Tue Aug 24 16:01:33 GMT 2021
https://gcc.gnu.org/g:8334ee1922104b5379efe94a19e17bc630cae9d5
commit r11-8922-g8334ee1922104b5379efe94a19e17bc630cae9d5
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.
(cherry picked from commit 85a709595005b5df4b2ee9d81717a5df19c0023f)
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 64a6606bb33..8572e376c92 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);
}
More information about the Libstdc++-cvs
mailing list