From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id CDB5E385702B for ; Wed, 12 Jul 2023 09:49:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CDB5E385702B Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1689155353; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=F4kdpF6USD3APnuGKuI/2e7cLLHVfgDwCbO7EsSvHqw=; b=W/t+SxGxlFigYj3I4hsaLdcr8AxlCuYL6XXaQb3g0VFn3Mi4SOYxO6OzohV0Zbi2ecRGGr pX1wx9H6sgRhM61WfLKmGCnL4b+AQpb4flY7ieqX07dUbW1kCjPYHvIvDvSMpus2iPsFIR 5yGP3veyWPVKeV4eLw7UM8gV6l4Ojyk= Received: from mail-lf1-f71.google.com (mail-lf1-f71.google.com [209.85.167.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-313-09DPY_pLPCODnjDnJZ3onw-1; Wed, 12 Jul 2023 05:49:12 -0400 X-MC-Unique: 09DPY_pLPCODnjDnJZ3onw-1 Received: by mail-lf1-f71.google.com with SMTP id 2adb3069b0e04-4f3932e595dso6171204e87.1 for ; Wed, 12 Jul 2023 02:49:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689155350; x=1691747350; 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=F4kdpF6USD3APnuGKuI/2e7cLLHVfgDwCbO7EsSvHqw=; b=hlbOygA8swiZHLg7SUyiHCyMy2ObXYlg93yqNJrwITUAWQzpRRciDIIDj/3PM8pSj2 MIugQ65IosojzvMAO5D+/qbiqU7XhQC+hZZPAWqNxIEY+M4kGzIKdegtZeNiXzLiXYE0 ghQEOJUkJRgOnWeCA7w0eqIba2RK8xLhsqHRETbqwlbr7KYxFnzwtQYqKllAVYaFKLva M/BQJbQ+PdmiAPIalblYit8onTqG3CXCZBYpjLxuSBQKeoKaU6esW92I2oea7Anyl0cj 7Yyt+xk0xBKtiw3RmCvxI+NapEp7wvKci93SbFWErLEPVkbeyddFj0d07714F0hbtB09 v1vw== X-Gm-Message-State: ABy/qLYPlnq+u6sg52cmP2nURweb/ZZjR/Jk0HIqA+HXBJtmAPmtZAJc GvFZbnZ8k6f8rLASfCqgtIZUV+NVE4Ul48OATEEf1+dfqEzIlD7CJDBXz+0K7IM8qzKKelS+sZD 1bAHgbCTdoZIzdDPG9P4aTsQ6b61IHZ8= X-Received: by 2002:a2e:3317:0:b0:2b6:cb55:72bc with SMTP id d23-20020a2e3317000000b002b6cb5572bcmr16341325ljc.1.1689155350613; Wed, 12 Jul 2023 02:49:10 -0700 (PDT) X-Google-Smtp-Source: APBJJlEpLBlZ5nFxHz7jYBuYrFBlyGIc9NmXky8guIVwRsSxyDjLExURfr93zRSuFCF2h4FUa6kvgCTqlG6xxwRZ0Wc= X-Received: by 2002:a2e:3317:0:b0:2b6:cb55:72bc with SMTP id d23-20020a2e3317000000b002b6cb5572bcmr16341318ljc.1.1689155350345; Wed, 12 Jul 2023 02:49:10 -0700 (PDT) MIME-Version: 1.0 References: <20230710052310.48116-1-kmatsui@gcc.gnu.org> In-Reply-To: <20230710052310.48116-1-kmatsui@gcc.gnu.org> From: Jonathan Wakely Date: Wed, 12 Jul 2023 10:48:59 +0100 Message-ID: Subject: Re: [PATCH 1/2] c++, libstdc++: implement __is_pointer built-in trait To: Ken Matsui Cc: gcc-patches@gcc.gnu.org, libstdc++@gcc.gnu.org X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Mon, 10 Jul 2023 at 06:24, Ken Matsui via Libstdc++ wrote: > > This patch implements built-in trait for std::is_pointer. > > gcc/cp/ChangeLog: > > * cp-trait.def: Define __is_pointer. > * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_POINTER. > * semantics.cc (trait_expr_value): Likewise. > (finish_trait_expr): Likewise. > > gcc/testsuite/ChangeLog: > > * g++.dg/ext/has-builtin-1.C: Test existence of __is_pointer. > * g++.dg/ext/is_pointer.C: New test. > * g++.dg/tm/pr46567.C (__is_pointer): Rename to ... > (____is_pointer): ... this. > * g++.dg/torture/20070621-1.C: Likewise. > * g++.dg/torture/pr57107.C: Likewise. > > libstdc++-v3/ChangeLog: > > * include/bits/cpp_type_traits.h (__is_pointer): Rename to ... > (____is_pointer): ... this. Please pick another name, ____is_pointer is not OK for the library trait. (It might be OK for the g++.dg tests, I have no opinion on that.) You could use __is_pointer_type or __is_ptr, I don't really mind which (it's only used in two places).