mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-14 21:01:22 +08:00
libstdc++: Fix mistake in PR98374 change [PR98377]
The #ifdef RADIXCHAR directive should be moved one line up so that it also guards the outer if statement, or else when RADIXCHAR is not defined the outer if statement will end up nonsensically guarding the declaration of output_length_upper_bound a few lines below it. libstdc++-v3/ChangeLog: PR libstdc++/98377 * src/c++17/floating_to_chars.cc (__floating_to_chars_precision): Fix mistake.
This commit is contained in:
parent
22a7e82c20
commit
60cecb2b83
@ -1114,8 +1114,8 @@ template<typename T>
|
||||
// Since the output of printf is locale-sensitive, we need to be able
|
||||
// to handle a radix point that's different from '.'.
|
||||
char radix[6] = {'.', '\0', '\0', '\0', '\0', '\0'};
|
||||
if (effective_precision > 0)
|
||||
#ifdef RADIXCHAR
|
||||
if (effective_precision > 0)
|
||||
// ???: Can nl_langinfo() ever return null?
|
||||
if (const char* const radix_ptr = nl_langinfo(RADIXCHAR))
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user