aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2025-02-20 15:16:11 +0000
committerJonathan Wakely <redi@gcc.gnu.org>2025-02-22 21:20:18 +0000
commita742b27bd2da33640222b1f85a4576d6d0aa2759 (patch)
treef3f9a2204f514e80ad89fcd5a6e4cf8dac3fa55c
parentc978965b445079abbb88c22ba74de1e26e9f5b81 (diff)
downloadgcc-a742b27bd2da33640222b1f85a4576d6d0aa2759.zip
gcc-a742b27bd2da33640222b1f85a4576d6d0aa2759.tar.gz
gcc-a742b27bd2da33640222b1f85a4576d6d0aa2759.tar.bz2
libstdc++: Remove redundant cast in floating_from_chars.cc
In r15-7647-g32457bc25fea80 I added a cast and also changed the type of the variable, making the cast redundant. This removes the cast. libstdc++-v3/ChangeLog: * src/c++17/floating_from_chars.cc (__floating_from_chars_hex): Remove redundant cast.
-rw-r--r--libstdc++-v3/src/c++17/floating_from_chars.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/libstdc++-v3/src/c++17/floating_from_chars.cc b/libstdc++-v3/src/c++17/floating_from_chars.cc
index d48f1c0..9bad12c 100644
--- a/libstdc++-v3/src/c++17/floating_from_chars.cc
+++ b/libstdc++-v3/src/c++17/floating_from_chars.cc
@@ -1103,8 +1103,7 @@ namespace
// If the leading hexit is not '1', shift MANTISSA to make it so.
// This normalizes input like "4.08p0" into "1.02p2".
const unsigned leading_hexit = mantissa >> mantissa_bits;
- const int leading_hexit_width
- = __bit_width((unsigned)leading_hexit); // FIXME: optimize?
+ const int leading_hexit_width = __bit_width(leading_hexit); // FIXME: optimize?
__glibcxx_assert(leading_hexit_width >= 1 && leading_hexit_width <= 4);
shift_mantissa(leading_hexit_width - 1);
// After this adjustment, we can assume the leading hexit is '1'.