diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2024-08-06 21:26:24 +0100 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2024-08-06 23:36:50 +0100 |
commit | 3290826c190157cfa6ac1c12cce39ff746e5983a (patch) | |
tree | 02b446093a2113718b6f7d050babfb2a90116eb1 | |
parent | 77f36e8016e11c051aa8264f3c43ab2c27aece55 (diff) | |
download | gcc-3290826c190157cfa6ac1c12cce39ff746e5983a.zip gcc-3290826c190157cfa6ac1c12cce39ff746e5983a.tar.gz gcc-3290826c190157cfa6ac1c12cce39ff746e5983a.tar.bz2 |
libstdc++: Fix some undeclared uses of uintptr_t [PR116247]
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>.
-rw-r--r-- | libstdc++-v3/include/bits/fs_path.h | 2 | ||||
-rw-r--r-- | libstdc++-v3/include/bits/shared_ptr_atomic.h | 1 | ||||
-rw-r--r-- | libstdc++-v3/include/ext/pointer.h | 1 |
3 files changed, 3 insertions, 1 deletions
diff --git a/libstdc++-v3/include/bits/fs_path.h b/libstdc++-v3/include/bits/fs_path.h index a42f4bf..62af6d9 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<uintptr_t>(_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 1403c6a..1e314b0 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 534b3c7..0ead6f5 100644 --- a/libstdc++-v3/include/ext/pointer.h +++ b/libstdc++-v3/include/ext/pointer.h @@ -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> |