From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x531.google.com (mail-ed1-x531.google.com [IPv6:2a00:1450:4864:20::531]) by sourceware.org (Postfix) with ESMTPS id 427D73858D32; Sun, 20 Nov 2022 23:17:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 427D73858D32 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ed1-x531.google.com with SMTP id x102so14056313ede.0; Sun, 20 Nov 2022 15:17:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=zL7fT1ZurdL9fkyWyeNcD2npB9Xg5/cfHQ36XUoC+xg=; b=NQ+0SjE8NrVxSAIjWOnsRQuS69GtqUpm49zDlJhaicUc0qNvZkVGI8gLcDRyrm5PxY VBbSMpWq9fk9bIGFJLrrwjJ1moCUlos1Wat8oH0tPRnZz8pl9+deWh1z9HDFqUaNcr2n PjpCqHxYz6p6AlHdrHvifM+vRuvpnutVSEWeizDLkJ5+7As8SqLqmQt2CXICpqQcoH2P HNFIe6o4Ms+69Jzn+yk+3z/RzuWK2Gq4I5A91gB+y+6661VP2QGBJg030Rm39jNO0KEj V3sbAq7xjaN5Czz/jT4bTZ2bTO2saVaXvf2InBAqh+Ktu/yXfa4GYYwvr/o/979xdC+2 5EPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=zL7fT1ZurdL9fkyWyeNcD2npB9Xg5/cfHQ36XUoC+xg=; b=bFpEX/j+8/+WZNcqYZ9twnvirMZAjuR5JxGZ7X6E3TdqeMvaseFBB0XcrjdqfE10uM elhyiTYWfsmQ0SU/26SppiuVmzLNwCPxlMIhRscpM5ViSDXGCIz4eIy9ePaeaHO6s+Zg mJqidJnRkWKpo/KHN1ril5heXsErLUVM6k42ikJtEpWV1R+1+6oqBA4/ZlHm4jsfy29u FLyOh9XgWcJ3kgE39rnxXvoYeJat1Uhk6YggwNPDE5FfrcShsCXfOafzwAmmE9GCDwNL KkrVqMjSLS5GmwFwE2xC4PqKBUHAjTSqyFSVj79PJox4Z5ZPF1X5Vh3z4m/WJeWjHo0i afGw== X-Gm-Message-State: ANoB5pmfxl5vS10t94bfhXlvBU8qXq+CpZ1qlwmbK3tIgA0YafpQeXwY 33v5YiWX6TKn/YnQmx77zlaXH9bA8tc748s/oAVEBXJ1 X-Google-Smtp-Source: AA0mqf46hcQ2Kd6b2nL9znYfttpYlvL2XjHvR9nXUmWfekx1Y2A1uz1J4qA7aYIjKfKiGYglSXV0gnWH6YC2NCQmUcE= X-Received: by 2002:aa7:c04f:0:b0:45c:f13b:4b96 with SMTP id k15-20020aa7c04f000000b0045cf13b4b96mr13926475edo.129.1668986246787; Sun, 20 Nov 2022 15:17:26 -0800 (PST) MIME-Version: 1.0 References: <181a331d-ba82-2caf-ce2b-f00665bcafc7@gmail.com> In-Reply-To: <181a331d-ba82-2caf-ce2b-f00665bcafc7@gmail.com> From: Jonathan Wakely Date: Sun, 20 Nov 2022 23:17:13 +0000 Message-ID: Subject: Re: [PATCH] Fix in _GLIBCXX_INLINE_VERSION mode To: =?UTF-8?Q?Fran=C3=A7ois_Dumont?= Cc: "libstdc++" , gcc-patches Content-Type: multipart/alternative; boundary="0000000000005ff99405edef24a4" X-Spam-Status: No, score=-0.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE,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 List-Id: --0000000000005ff99405edef24a4 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sun, 20 Nov 2022, 20:45 Fran=C3=A7ois Dumont, wro= te: > On 19/11/22 14:11, Jonathan Wakely wrote: > > On Sat, 19 Nov 2022 at 13:03, Fran=C3=A7ois Dumont via Libstdc++ > > wrote: > >> 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/inc= lude/bits/locale_facets.h:2649: > >> note: candidate: 'template bool std::__9::isxdigit(_Char= T, > >> const locale&)' > >> > /home/fdt/dev/gcc/build_versioned_ns/x86_64-pc-linux-gnu/libstdc++-v3/inc= lude/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/inc= lude/format:1540: > >> note: candidate expects 2 arguments, 1 provided > >> > /home/fdt/dev/gcc/build_versioned_ns/x86_64-pc-linux-gnu/libstdc++-v3/inc= lude/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/inc= lude/bits/locale_facets.h:2649: > >> note: candidate: 'template bool std::__9::isxdigit(_Char= T, > >> const locale&)' > >> > /home/fdt/dev/gcc/build_versioned_ns/x86_64-pc-linux-gnu/libstdc++-v3/inc= lude/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/inc= lude/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/inc= lude/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/inc= lude/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. > > I think the real problem is that include/c_global/cctype is missing > > the NAMESPACE_VERSION macros. > > > > All declarations of std::isxdigit etc should be in the same namespace, > > precisely so we don't need to do this. > > Didn't you want to fix it this way then ? > > To be honest I was a little bit lost by this code: > > #if !__has_builtin(__builtin_toupper) > # include > #endif > > Looks like cctype is included only for toupper, why not for isxdigit ? > The idea was to only include it when needed for clang. But of course it's already included by and so that check is pointless. I think we might want to use the built-in for isxdigit as well, because the built-in ignores the locale which is what we want here. Or we should just replace toupper and isxdigit with locale-independent equivalents. > > > >> libstdc++: Add missing std qualification on isxdigit calls > >> > >> libstdc++-v3/ChangeLog > >> > >> * include/std/format: Add std qualification on isxdigit > calls. > >> > >> Ok to commit ? > > Yes, OK. > > Committed. > Thanks. > --0000000000005ff99405edef24a4--