From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ua1-x935.google.com (mail-ua1-x935.google.com [IPv6:2607:f8b0:4864:20::935]) by sourceware.org (Postfix) with ESMTPS id 75E623858C53 for ; Tue, 28 Mar 2023 21:29:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 75E623858C53 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=cs.washington.edu Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=cs.washington.edu Received: by mail-ua1-x935.google.com with SMTP id v48so9937949uad.6 for ; Tue, 28 Mar 2023 14:29:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.washington.edu; s=goo201206; t=1680038983; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=AzBF1owZxFRD65bwY6eqZK3BZmmfcPttKx8xRAAGRPU=; b=dCcmG9m2++Zu8b9N8Hp4bLXRJO7OP75igZQMfp0xcQ3wMBf4n340BESLbjokbfDWZs rSM8rDSDHIizAHR2Mwtz2iGWYSoT1Edb3S3KE4Vo+LWDV5V6Vbs5hh9NtopEyHUZCmNJ u0zl6IwYDq2i030jH6zxiyjZDSfh/RyzkCsCU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680038984; h=content-transfer-encoding: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=AzBF1owZxFRD65bwY6eqZK3BZmmfcPttKx8xRAAGRPU=; b=X+DOCtLwSiLG3aK9myT6gw6YwWbVYHhDAKxlfgIv7oq0ujYIbeVuy9+nWTELc2ecEr Qud2kVElMCPo/+GfM4DVJSEM0VLIhqdhbNmvU5sP213HZQv1YRlcdhz2fCCA7fQ6GduC I9Lt1KiP5ZguAe0EY3Ju1P7hzpUorpMP2cqq0SH2yoZRWjWHvK/OdWCtQFsw0uClWwmw yOHedAydpqhHlZyf9Xe0CPK9cyVQ1WUqH64gt0qzvQI3ts1ZWzu8SO5kKFaVk7skoUuq gwUuG59uA6zBf9CX64isd78za3lck/8lYdFzjgbLuDM8ewdKPp57u5nG4oB4lO4csdya vSJg== X-Gm-Message-State: AAQBX9fLaRrlPFXt7e/GP0R0lNvZaPoNcfiWnRnG1k9tACfP9rAGBAFk fhnXUq5MVmKPSFNxu6PebJ97UZPluEMnkhIm8BHCKv9qJ3wfMQ6rVK8= X-Google-Smtp-Source: AKy350ZlFNEQe/GhWHu2VAt2DY/EWhGxJS8hL8ncWyCzpxresmPp27p1nPHC0hZj4AlWTUXxqboAZ+xgCQj92+lldr0= X-Received: by 2002:a05:6130:3a9:b0:68d:6360:77b with SMTP id az41-20020a05613003a900b0068d6360077bmr13545839uab.1.1680038983702; Tue, 28 Mar 2023 14:29:43 -0700 (PDT) MIME-Version: 1.0 References: <7f83711f-5094-6c6d-822b-966293062afc@inria.fr> In-Reply-To: From: Ken Matsui Date: Tue, 28 Mar 2023 14:29:33 -0700 Message-ID: Subject: Re: [GSoC] Conflicted Built-in Trait Name To: =?UTF-8?Q?Fran=C3=A7ois_Dumont?= Cc: libstdc++@gcc.gnu.org, gcc@gcc.gnu.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,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: Hi Fran=C3=A7ois, I tried to use `make check-debug`, but my Makefile does not include the target. Could you please tell me how you generated your Makefile? FYI, I did this command: `../configure --enable-languages=3Dc++ --disable-error --disable-bootstrap`. Sincerely, Ken Matsui On Mon, Mar 27, 2023 at 10:33=E2=80=AFAM Fran=C3=A7ois Dumont wrote: > > > On 26/03/2023 04:01, Ken Matsui via Libstdc++ wrote: > > On Sat, Mar 25, 2023 at 5:38=E2=80=AFAM Marc Glisse wrote: > >> On Sat, 25 Mar 2023, Ken Matsui via Gcc wrote: > >> > >>> Built-in trait naming simply adds two underscores (__) to the origina= l > >>> trait name. However, the same names are already in use for some > >>> built-in traits, such as is_void, is_pointer, and is_signed. > >>> > >>> For example, __is_void is used in the following files: > >>> > >>> * gcc/testsuite/g++.dg/tm/pr46567.C > >> This is a testcase, you can rename __is_void to whatever in there, it > >> doesn't matter. > >> > >>> * libstdc++-v3/include/bits/cpp_type_traits.h > >> This __is_void seems to be used in a single place in > >> include/debug/helper_functions.h, couldn't we tweak that code so __is_= void > >> becomes unused and can be removed? > > That worked. Thank you! > What worked ? > > > > So, we can remove a code in a header as long as it is not standard and > > is not used elsewhere, can't we? > > You can do anything you like as long as you run the testsuite before > presenting your patch. Here note that you'll need to run: > > make check-debug > > to run tests in _GLIBCXX_DEBUG mode which is making use of the code in > helper_functions.h. > > Clearly this usage of std::__is_void could be replaced with your builtin > by reimplementing _Distance_traits like this: > > template typename =3D typename std::__is_integer<_Iterator>::__type> > struct _Distance_traits > { > private: > typedef > typename std::iterator_traits<_Iterator>::difference_type _ItDiffTyp= e; > > typedef > typename std::conditional<__is_void<_ItDiffType>, > std::ptrdiff_t, _ItDiffType>::type _DiffType; > > public: > typedef std::pair<_DiffType, _Distance_precision> __type; > }; > > this is untested, just to give you an idea of what your patch could be. > > Fran=C3=A7ois > >