]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Fix some undeclared uses of uintptr_t [PR116247]
authorJonathan Wakely <jwakely@redhat.com>
Tue, 6 Aug 2024 20:26:24 +0000 (21:26 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Tue, 6 Aug 2024 22:36:50 +0000 (23:36 +0100)
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 <stdint.h>.

libstdc++-v3/include/bits/fs_path.h
libstdc++-v3/include/bits/shared_ptr_atomic.h
libstdc++-v3/include/ext/pointer.h

index a42f4bf925251124d700a0a34c8d4791d7c3a8e6..62af6d98bb7db811715708d7f2c338c47a5dacac 100644 (file)
@@ -689,7 +689,7 @@ namespace __detail
       ~_List() = default;
 
       _Type type() const noexcept
-      { return _Type(reinterpret_cast<uintptr_t>(_M_impl.get()) & 0x3); }
+      { return _Type(reinterpret_cast<__UINTPTR_TYPE__>(_M_impl.get()) & 0x3); }
 
       void type(_Type) noexcept;
 
index 1403c6a17c5f6cd32e2b7f0075ddd6f8b058fa0e..1e314b044bcdb68fae27ecedd4b34daa61194c41 100644 (file)
@@ -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);
index 534b3c78226e716548f01ccaf0d1214e4675d704..0ead6f53d5f56caa9f15c1b5907122c99eb447e4 100644 (file)
@@ -42,6 +42,7 @@
 #  include <iosfwd>
 #endif
 
+#include <stdint.h> // uintptr_t
 #include <bits/stl_iterator_base_types.h>
 #include <ext/cast.h>
 #include <ext/type_traits.h>