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: 23268 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp702013wrr; Sat, 19 Nov 2022 05:03:53 -0800 (PST) X-Google-Smtp-Source: AA0mqf5feZUCaaqWcgVRaj0g2MsYTKN4wKgC98T6hS4i9ZXeQJtt8GQDQKUWVD5D7MZqzeCIq1we X-Received: by 2002:a17:906:a387:b0:78d:946e:f65d with SMTP id k7-20020a170906a38700b0078d946ef65dmr9452457ejz.365.1668863033638; Sat, 19 Nov 2022 05:03:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668863033; cv=none; d=google.com; s=arc-20160816; b=TBNedUYHAVrUzKvvqgFLByZechnQlc7ZfZphQ8TRTECNEQiL/e8agcrQlfpoM14aAG oR4MNEyKPznZiLKLlH/ke36rBkHal81CEmZqCX3GKvS0WUof9wXIcc6MhO5304zecORJ TcJ1nndw58W20h+OtC6uujWoZqjlz8phJsEhBNbDjYAic53rVl8EVnoCChbPZXKBy/ck kNt7rD2fJ6JnXnf3fAGlbwG8ppp7HF5CSYEXG6XJ2NTzmQFh+QqmJsuLOPi0FJMazSTM ZOwD55tmubZiAN67bIgksFUSUVp8vZ5qnjs6hIw7dPDeY3ubMwPtd+ST18pAIxL7AOA6 1PGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:subject:cc:to :content-language:user-agent:mime-version:date:message-id :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=foYEB+57OrE/GIGBaVg6UxiBOrbPw1fC/I8cCnzFqTc=; b=BgmI0NpG1hYWruvBllAk9vgNDpOV6r7uH851DZMUUHApVxMJnP0PMVBKSZ2+OYRgBq t81Qb+odQK8pAemBHATdWGLBszitoc2I+FKF4cG+ixzGlBlhRipQKFRkYUuxpJ9ZD95Z ipljteIodoBRRfsprz1Nqhf9rRJVhRMPv1dCgYs6MiW6OVuaOVUd/6ZC4sQJR8/3o/m7 FofNQNpL/0gFRGkOa+HUGb/zD9pfvbnsYJVla08isYFqKndmxcFkQJY0UiOBI1lzZ2nC NBqlKC4AnRzYV5jLBhnXygfskbfk8+XQahJPY5nQ27Fn5M+JtRYnVAR7/JWEjjX9kx/P Ks5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=hC54I67I; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id hw9-20020a170907a0c900b007833cbbb747si2755904ejc.578.2022.11.19.05.03.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 19 Nov 2022 05:03:53 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=hC54I67I; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9C6673852C56 for ; Sat, 19 Nov 2022 13:03:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9C6673852C56 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1668863014; 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=hC54I67Il+ZFWiAcULYNLvfuZewYqKRHHQMIQ/2JFKvdMDa4VbSY/1h1YozqdpIuy irXGNyFUp2WG1N1aGay3wMxlUgWwK0aPvrFx/CJv4XUGD5CjcpHcCi9Re5YQU+2R/l nkXJsxg7JlX9/S83dO9JnwL/V29uBxa33Sp4u8XE= 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-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+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749929724278561910?= X-GMAIL-MSGID: =?utf-8?q?1749929724278561910?= 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);