From patchwork Tue Aug 6 22:37:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 1969697 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=AoKVTo5y; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; 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 [IPv6:2620:52:3:1:0:246e:9693:128c]) (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 4WdpBt3YdKz1ybS for ; Wed, 7 Aug 2024 08:39:18 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 45744385B82F for ; Tue, 6 Aug 2024 22:39:16 +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 ESMTP id D2C5E385700F for ; Tue, 6 Aug 2024 22:38:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D2C5E385700F 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 D2C5E385700F 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=1722983905; cv=none; b=ASAK6jZUzLyqoo0fQVxyEqF4CW7yg5cPZ4pB1c7Zx5oa8bBexiY4EtrZaz/gwsrobwDu40TSiGH3MSwAMaFUgeuyw8oJ3fA56akk1vqp9a9hTJTxc+03xbyHjt46RaBbSOvGUEJZuHhfMlsJMUTPpBP8/hqrtaYCb0PuQPLttMo= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1722983905; c=relaxed/simple; bh=EUuHX40XyGSwggIxNEiYlXBTqKkqtuEw9cqn8UqoauA=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=opJ4pBoJObvyeyP8y3nAmeCTNN5V3PLvXPKrfac5kHsc69Vqqmg2Z/W4uzkWvpQ0tjBqT2KmDrT2BvcRv16NtHhSeZprcV/qSZKaVAN10erYCwLNDVq6CwBo7FdLP6HYXp+JZwMEcBO13nRZ6mnI/M4mvqOlRTLJWLk5As7M5aY= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1722983903; 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=ak+BShg6ZniIXs9LHWVXBHN6i99OhNMyINYdxBhI7LM=; b=AoKVTo5yZp8qdNErBHjxquTQxLblaB3YCT/rK38GXW0moLcIo8yvG78y25CTwX5AHV4/F9 RwquqXGcb8jmroBoLAwHyYcxukdlpsuLfm58uwx+bBDwnBxL2DFyA3xEQqjPbwRWVQ3lOL iCPqWHphghOwO7RMw4YbQ39xc3hMQso= Received: from mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-312-sE0ucBQ8NGOd064v2aeNQw-1; Tue, 06 Aug 2024 18:38:22 -0400 X-MC-Unique: sE0ucBQ8NGOd064v2aeNQw-1 Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.40]) (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 mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 37B9C1956088; Tue, 6 Aug 2024 22:38:21 +0000 (UTC) Received: from localhost (unknown [10.42.28.22]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 1B7D7195605F; Tue, 6 Aug 2024 22:38:19 +0000 (UTC) From: Jonathan Wakely To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [committed] libstdc++: Fix some undeclared uses of uintptr_t [PR116247] Date: Tue, 6 Aug 2024 23:37:56 +0100 Message-ID: <20240806223818.20549-1-jwakely@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-12.1 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_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, 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.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 powerpc64-linux. Pushed to trunk. -- >8 -- libstdc++-v3/ChangeLog: PR libstdc++/116247 * include/bits/fs_path.h: Use __UINTPTR_TYPE__ instead of uintptr_t. * include/bits/shared_ptr_atomic.h: Likewise. * include/ext/pointer.h: Include . --- libstdc++-v3/include/bits/fs_path.h | 2 +- libstdc++-v3/include/bits/shared_ptr_atomic.h | 1 + libstdc++-v3/include/ext/pointer.h | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/libstdc++-v3/include/bits/fs_path.h b/libstdc++-v3/include/bits/fs_path.h index a42f4bf9252..62af6d98bb7 100644 --- a/libstdc++-v3/include/bits/fs_path.h +++ b/libstdc++-v3/include/bits/fs_path.h @@ -689,7 +689,7 @@ namespace __detail ~_List() = default; _Type type() const noexcept - { return _Type(reinterpret_cast(_M_impl.get()) & 0x3); } + { return _Type(reinterpret_cast<__UINTPTR_TYPE__>(_M_impl.get()) & 0x3); } void type(_Type) noexcept; diff --git a/libstdc++-v3/include/bits/shared_ptr_atomic.h b/libstdc++-v3/include/bits/shared_ptr_atomic.h index 1403c6a17c5..1e314b044bc 100644 --- a/libstdc++-v3/include/bits/shared_ptr_atomic.h +++ b/libstdc++-v3/include/bits/shared_ptr_atomic.h @@ -401,6 +401,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { // Either __shared_count<> or __weak_count<> using __count_type = decltype(_Tp::_M_refcount); + using uintptr_t = __UINTPTR_TYPE__; // _Sp_counted_base<>* using pointer = decltype(__count_type::_M_pi); diff --git a/libstdc++-v3/include/ext/pointer.h b/libstdc++-v3/include/ext/pointer.h index 534b3c78226..0ead6f53d5f 100644 --- a/libstdc++-v3/include/ext/pointer.h +++ b/libstdc++-v3/include/ext/pointer.h @@ -42,6 +42,7 @@ # include #endif +#include // uintptr_t #include #include #include