From patchwork Sat Nov 19 13:02:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Fran=C3=A7ois_Dumont?= X-Patchwork-Id: 60879 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7BA57385841E for ; Sat, 19 Nov 2022 13:03:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7BA57385841E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1668862999; bh=foYEB+57OrE/GIGBaVg6UxiBOrbPw1fC/I8cCnzFqTc=; h=Date:To:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=i+0kWXh10QK2xTldiyyez1Rg+pZjWWyBVhawYP9/ynb+GNU1ghp7rrcFm0zFGxj4d LtSxoLSOVN1YhsaxkzJ71Pr9spVy1HhTY+VxX9XrF9AlMWypqWkif5h/8ZBSlLWBoM Pl4Fs8oJmMtJvd7z05+ClfFiC1KUtXJ/58Bryf98= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) by sourceware.org (Postfix) with ESMTPS id 560F73858D37; Sat, 19 Nov 2022 13:02:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 560F73858D37 Received: by mail-wm1-x331.google.com with SMTP id p16so5485816wmc.3; Sat, 19 Nov 2022 05:02:47 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=subject:from:cc:to:content-language:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=foYEB+57OrE/GIGBaVg6UxiBOrbPw1fC/I8cCnzFqTc=; b=Fdh2kmGs2M54D91GZ8pAsRVWcx2zdpfSgRvbXpf8A1K7kgjMvgzhy26VcB6nqKVMUc WHBvaXCV23PHVin7QwslyYL3OoZ0Y94BOL+Si695//XLhnFtd4iujh2vNEQnrRt5vmb9 CVxZ0okSfsc7nBe0Vp3NFQBzOvM1lGD5TC4mONz7cZigCxG3QzMZaqoutZE3nRBYIqs0 qVHHoGmdza6fSrM8bh4LlOEKK+PJfThTogMBqYdI7ltnGjMN+dAuOGfD5WmfCVn0t7ea s97mDxKzZLytUBLC+uldjKQS/tWli7IhBHdHmhgQmBGWNkhCH0jzBg3bJ/hC4jSRIeT1 CKJA== X-Gm-Message-State: ANoB5pmDkI1cwUSOAAuW1cXeVeBVRkXMGokRf3jCnDLjabN+V8jlP1Sd T84UFQ7BfKR7jdVaJR77GYsHFwbQ1RU= X-Google-Smtp-Source: AA0mqf5N8jzxFfB7biGK5KMMQo25l69MoE0AT/RCi2wAjUeWztZlzkijY0bn1aJzPkWxg6sFgNHQSg== X-Received: by 2002:a05:600c:6011:b0:3c6:cc1d:89a with SMTP id az17-20020a05600c601100b003c6cc1d089amr931371wmb.78.1668862965803; Sat, 19 Nov 2022 05:02:45 -0800 (PST) Received: from ?IPV6:2a01:e0a:1dc:b1c0:dbf6:3958:e878:1557? ([2a01:e0a:1dc:b1c0:dbf6:3958:e878:1557]) by smtp.googlemail.com with ESMTPSA id r13-20020a05600c458d00b003c7087f6c9asm12935798wmo.32.2022.11.19.05.02.44 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 19 Nov 2022 05:02:45 -0800 (PST) Message-ID: Date: Sat, 19 Nov 2022 14:02:44 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Content-Language: fr To: "libstdc++@gcc.gnu.org" Cc: gcc-patches Subject: [PATCH] Fix in _GLIBCXX_INLINE_VERSION mode X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00, BODY_8BITS, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: =?utf-8?q?Fran=C3=A7ois_Dumont_via_Gcc-patches?= From: =?utf-8?q?Fran=C3=A7ois_Dumont?= Reply-To: =?utf-8?q?Fran=C3=A7ois_Dumont?= Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" Without this qualification I have this in _GLIBCXX_INLINE_VERSION mode: /home/fdt/dev/gcc/build_versioned_ns/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/locale_facets.h:2649: note: candidate: 'template bool std::__9::isxdigit(_CharT, const locale&)' /home/fdt/dev/gcc/build_versioned_ns/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/locale_facets.h:2649: note:   template argument deduction/substitution failed: /home/fdt/dev/gcc/build_versioned_ns/x86_64-pc-linux-gnu/libstdc++-v3/include/format:1540: note:   candidate expects 2 arguments, 1 provided /home/fdt/dev/gcc/build_versioned_ns/x86_64-pc-linux-gnu/libstdc++-v3/include/format:1630: error: no matching function for call to 'isxdigit(const std::__9::basic_string_view::value_type&)' /home/fdt/dev/gcc/build_versioned_ns/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/locale_facets.h:2649: note: candidate: 'template bool std::__9::isxdigit(_CharT, const locale&)' /home/fdt/dev/gcc/build_versioned_ns/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/locale_facets.h:2649: note:   template argument deduction/substitution failed: /home/fdt/dev/gcc/build_versioned_ns/x86_64-pc-linux-gnu/libstdc++-v3/include/format:1630: note:   candidate expects 2 arguments, 1 provided compiler exited with status 1 FAIL: 17_intro/headers/c++2020/all_attributes.cc (test for excess errors) Excess errors: /home/fdt/dev/gcc/build_versioned_ns/x86_64-pc-linux-gnu/libstdc++-v3/include/format:1540: error: no matching function for call to 'isxdigit(const std::__9::basic_string_view::value_type&)' /home/fdt/dev/gcc/build_versioned_ns/x86_64-pc-linux-gnu/libstdc++-v3/include/format:1630: error: no matching function for call to 'isxdigit(const std::__9::basic_string_view::value_type&)' It sounds like the most reasonable fix as this is how toupper is being called.     libstdc++: Add missing std qualification on isxdigit calls     libstdc++-v3/ChangeLog             * include/std/format: Add std qualification on isxdigit calls. Ok to commit ? François diff --git a/libstdc++-v3/include/std/format b/libstdc++-v3/include/std/format index f4fc85a16d2..9f5b7bee2be 100644 --- a/libstdc++-v3/include/std/format +++ b/libstdc++-v3/include/std/format @@ -1537,7 +1537,7 @@ namespace __format if (__trailing_zeros) { - if (!isxdigit(__s[0])) + if (!std::isxdigit(__s[0])) --__sigfigs; __z = __prec - __sigfigs; } @@ -1627,7 +1627,7 @@ namespace __format { __fill_char = _CharT('0'); // Write sign before zero filling. - if (!isxdigit(__narrow_str[0])) + if (!std::isxdigit(__narrow_str[0])) { *__out++ = __str[0]; __str.remove_prefix(1);