aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Palka <ppalka@redhat.com>2020-12-18 13:01:49 -0500
committerPatrick Palka <ppalka@redhat.com>2020-12-18 13:01:49 -0500
commit60cecb2b83ffcebac6e83076f5552df14b073248 (patch)
tree0211425fac878950d188e2ea795eefac78e8e138
parent22a7e82c200d01d12e34e757e86dc9796a9bf085 (diff)
downloadgcc-60cecb2b83ffcebac6e83076f5552df14b073248.zip
gcc-60cecb2b83ffcebac6e83076f5552df14b073248.tar.gz
gcc-60cecb2b83ffcebac6e83076f5552df14b073248.tar.bz2
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.
-rw-r--r--libstdc++-v3/src/c++17/floating_to_chars.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/libstdc++-v3/src/c++17/floating_to_chars.cc b/libstdc++-v3/src/c++17/floating_to_chars.cc
index 3f46bce..b7c31c7 100644
--- a/libstdc++-v3/src/c++17/floating_to_chars.cc
+++ b/libstdc++-v3/src/c++17/floating_to_chars.cc
@@ -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))
{