From patchwork Mon Jan 8 16:13:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 1883781 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=iYULUYtB; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4T7zdp0L82z1yP3 for ; Tue, 9 Jan 2024 03:14:06 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id DD1C3385842D for ; Mon, 8 Jan 2024 16:14:03 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 6BF813858CDB for ; Mon, 8 Jan 2024 16:13:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6BF813858CDB Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 6BF813858CDB Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704730419; cv=none; b=mVvtIkNUtHMyTGINfmnHMdLaKMqwwNaZOFAsH+ReDO2HZU0al8rKE0Tx2G8k+g692a7AHTOE5EPN0Cv9fJXPWsPUNjs/U7AOP9KDhgUGSL6IpeOZKRaFtFM8yc3/t/tKpk3wY1nnqyIJmBYqoe7pZhN0TwWf8/CZfSqfXkl1TYU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704730419; c=relaxed/simple; bh=OLEmxXVg0mEuzEn9wCf9wLau666pGr/qLYECi3m94s8=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=moVEnrCLSG/QWBFBGK6WRTVw+KdU0BbiuJ+wwGeTOJFwMhrNMMQu/FqnpGwtkoqMKo0X1Nz4KzAy5ZmTmz2kx8cePk4Hs/lBfguf8V5JyPTFYnhOwwLbC9Cj5Dp1bax+ZOOD31NZ02RjY92YuvaZBxwDeMCg5RmG5xfgA8kgwcM= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1704730418; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8APuA3jKNeXkWzGjTIc+xg/pucZoUul6ei5NeuDqeCc=; b=iYULUYtBo2UDdD6ls4W3RfE42RjpUXWzjCKafA5G1hb9sZwWOJoDl0i3CIXSwJEEB/5vxw 67iagNZlqxuhrAbw0LkWRI1G/w+gQoo7N6IBoiPj9XbN11pVqp5741+q6ZbYAKNwqa5vwx VAkn1SHGLSP3XKRw5UxdFlPfQsgKejY= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-404-QVr1dB2rPdmQlvMhuywDZw-1; Mon, 08 Jan 2024 11:13:34 -0500 X-MC-Unique: QVr1dB2rPdmQlvMhuywDZw-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 632B184A294; Mon, 8 Jan 2024 16:13:34 +0000 (UTC) Received: from localhost (unknown [10.42.28.185]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2C0501121306; Mon, 8 Jan 2024 16:13:34 +0000 (UTC) From: Jonathan Wakely To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [committed] libstdc++: Remove std::__unicode::__null_sentinel Date: Mon, 8 Jan 2024 16:13:05 +0000 Message-ID: <20240108161333.3785051-1-jwakely@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.3 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-12.9 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, 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 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Tested x86_64-linux, pushed to trunk. -- >8 -- The name __null_sentinel is defined as a macro by newlib, so we can't use it as an identifier. That variable is not actually used by libstdc++, it was added because P2728R6 proposes std::uc::null_sentinel. Since we don't need it and it breaks bootstrap for newlib targets, just remove it. A null sentinel can still be used by constructing a _Null_sentinel_t object as needed, rather than having a named object of that type predefined. libstdc++-v3/ChangeLog: * include/bits/unicode.h (__null_sentinel): Remove. * testsuite/17_intro/names.cc: Add __null_sentinel. --- libstdc++-v3/include/bits/unicode.h | 2 -- libstdc++-v3/testsuite/17_intro/names.cc | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/libstdc++-v3/include/bits/unicode.h b/libstdc++-v3/include/bits/unicode.h index 66f8399fdfb..e49498a0531 100644 --- a/libstdc++-v3/include/bits/unicode.h +++ b/libstdc++-v3/include/bits/unicode.h @@ -83,8 +83,6 @@ namespace __unicode { return *__it == iter_value_t<_It>{}; } }; - inline constexpr _Null_sentinel_t __null_sentinel; - template _Sent = _Iter, typename _ErrorHandler = _Repl> diff --git a/libstdc++-v3/testsuite/17_intro/names.cc b/libstdc++-v3/testsuite/17_intro/names.cc index 5e77e9f2ab0..53c5aff219d 100644 --- a/libstdc++-v3/testsuite/17_intro/names.cc +++ b/libstdc++-v3/testsuite/17_intro/names.cc @@ -140,6 +140,7 @@ // These clash with newlib so don't use them. # define __lockable cannot be used as an identifier +# define __null_sentinel cannot be used as an identifier # define __packed cannot be used as an identifier # define __unused cannot be used as an identifier # define __used cannot be used as an identifier