aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2025-05-06 12:47:32 +0100
committerJonathan Wakely <redi@gcc.gnu.org>2025-05-06 17:19:25 +0100
commitccf0b93b3ccf67b98fbd5096852c369d2cac7904 (patch)
tree4c1c5f90bb1399b814be03b91cb3540c345a09f0
parente7a2b8b76ae0c8f1e49c780aa82ebb5f0325f515 (diff)
downloadgcc-ccf0b93b3ccf67b98fbd5096852c369d2cac7904.zip
gcc-ccf0b93b3ccf67b98fbd5096852c369d2cac7904.tar.gz
gcc-ccf0b93b3ccf67b98fbd5096852c369d2cac7904.tar.bz2
libstdc++: Fix -Wmismatched-tags warnings for _Safe_iterator [PR120112]
This causes an ICE as shown in the PR, but it should be fixed in the library code anyway. libstdc++-v3/ChangeLog: PR c++/120112 * include/bits/ptr_traits.h (_Safe_iterator_base): Use class keyword in class-head of declaration. * include/debug/debug.h (_Safe_iterator): Likewise.
-rw-r--r--libstdc++-v3/include/bits/ptr_traits.h2
-rw-r--r--libstdc++-v3/include/debug/debug.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/libstdc++-v3/include/bits/ptr_traits.h b/libstdc++-v3/include/bits/ptr_traits.h
index 4308669..91da88b 100644
--- a/libstdc++-v3/include/bits/ptr_traits.h
+++ b/libstdc++-v3/include/bits/ptr_traits.h
@@ -36,7 +36,7 @@
#if __cplusplus > 201703L
#include <concepts>
-namespace __gnu_debug { struct _Safe_iterator_base; }
+namespace __gnu_debug { class _Safe_iterator_base; }
#endif
namespace std _GLIBCXX_VISIBILITY(default)
diff --git a/libstdc++-v3/include/debug/debug.h b/libstdc++-v3/include/debug/debug.h
index 0e02d58..0131c0a 100644
--- a/libstdc++-v3/include/debug/debug.h
+++ b/libstdc++-v3/include/debug/debug.h
@@ -58,7 +58,7 @@ namespace __gnu_debug
using namespace std::__debug;
template<typename _Ite, typename _Seq, typename _Cat>
- struct _Safe_iterator;
+ class _Safe_iterator;
}
#if ! defined _GLIBCXX_DEBUG || ! _GLIBCXX_HOSTED