mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-26 01:40:55 +08:00
libstdc++: Fix build failure on AArch64 ILP32 [PR98370]
This should fix a build failure on AArch64 ILP32 due to int32_t mapping to long int instead of int on this platform, which causes type deduction to fail in the below call to std::max as reported in the PR. libstdc++-v3/ChangeLog: PR libstdc++/98370 * src/c++17/floating_to_chars.cc (__floating_to_chars_shortest): Provide explicit template arguments to the call to std::max.
This commit is contained in:
parent
d7bab388b8
commit
22a7e82c20
@ -977,7 +977,7 @@ template<typename T>
|
||||
// fd.exponent contain all of the information needed to format the
|
||||
// number in fixed notation "as if by std::printf" (with precision
|
||||
// equal to -fd.exponent).
|
||||
const int whole_digits = max(mantissa_length + fd.exponent, 1);
|
||||
const int whole_digits = max<int>(mantissa_length + fd.exponent, 1);
|
||||
const int expected_output_length
|
||||
= fd.sign + whole_digits + strlen(".") + -fd.exponent;
|
||||
if (last - first < expected_output_length)
|
||||
|
Loading…
x
Reference in New Issue
Block a user