From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1888) id F31553857004; Fri, 18 Dec 2020 18:03:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F31553857004 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Patrick Palka To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r11-6261] libstdc++: Fix mistake in PR98374 change [PR98377] X-Act-Checkin: gcc X-Git-Author: Patrick Palka X-Git-Refname: refs/heads/master X-Git-Oldrev: 22a7e82c200d01d12e34e757e86dc9796a9bf085 X-Git-Newrev: 60cecb2b83ffcebac6e83076f5552df14b073248 Message-Id: <20201218180355.F31553857004@sourceware.org> Date: Fri, 18 Dec 2020 18:03:55 +0000 (GMT) X-BeenThere: libstdc++-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Dec 2020 18:03:56 -0000 https://gcc.gnu.org/g:60cecb2b83ffcebac6e83076f5552df14b073248 commit r11-6261-g60cecb2b83ffcebac6e83076f5552df14b073248 Author: Patrick Palka Date: Fri Dec 18 13:01:49 2020 -0500 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. Diff: --- libstdc++-v3/src/c++17/floating_to_chars.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libstdc++-v3/src/c++17/floating_to_chars.cc b/libstdc++-v3/src/c++17/floating_to_chars.cc index 3f46bce7a15..b7c31c746cc 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 // 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)) {