From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2181) id 86D113858C5F; Mon, 18 Mar 2024 14:04:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 86D113858C5F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1710770669; bh=Lxc0HTJ9/vixhYUlUlOmdmqQfLbzM42MqCY3ngOy4eE=; h=From:To:Subject:Date:From; b=s8R5JB9sijh9K1taz+E2LKeiHGOebsosn2K1gwEWoCJVImRHuB8TEky4ovlQwO2QP TwTNX9E7MKVI4CX1/g78DktUjUESkSdtcHtX5HF1PkGrf/e0zgOstnhSKsvK3gNTTH DRZAxaB6ko/68yYm9ShfRz7tj2kLmJpIWYDoZGk4= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Jonathan Wakely To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r12-10234] libstdc++: Fix some -Wmismatched-tags warnings X-Act-Checkin: gcc X-Git-Author: Jonathan Wakely X-Git-Refname: refs/heads/releases/gcc-12 X-Git-Oldrev: 8364faf223e54c0ddf7ab35eda158533e5195bb6 X-Git-Newrev: fe1c4d6cce6a35c0800f26d87c411a34cb9472bb Message-Id: <20240318140429.86D113858C5F@sourceware.org> Date: Mon, 18 Mar 2024 14:04:28 +0000 (GMT) List-Id: https://gcc.gnu.org/g:fe1c4d6cce6a35c0800f26d87c411a34cb9472bb commit r12-10234-gfe1c4d6cce6a35c0800f26d87c411a34cb9472bb Author: Jonathan Wakely Date: Tue Aug 8 22:07:29 2023 +0100 libstdc++: Fix some -Wmismatched-tags warnings libstdc++-v3/ChangeLog: * include/bits/shared_ptr_atomic.h (atomic): Change class-head to struct. * include/bits/stl_tree.h (_Rb_tree_merge_helper): Change class-head to struct in friend declaration. * include/std/future (_Task_state_base, _Task_state): Likewise. * include/std/scoped_allocator (__inner_type_impl): Likewise. * include/std/valarray (_BinClos, _SClos, _GClos, _IClos) (_ValFunClos, _RefFunClos): Change class-head to struct. (cherry picked from commit 5b46eacc4949ec62ee718b172cf8eb056ff27654) Diff: --- libstdc++-v3/include/bits/shared_ptr_atomic.h | 8 ++++---- libstdc++-v3/include/bits/stl_tree.h | 2 +- libstdc++-v3/include/std/future | 4 ++-- libstdc++-v3/include/std/scoped_allocator | 4 ++-- libstdc++-v3/include/std/valarray | 12 ++++++------ 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/libstdc++-v3/include/bits/shared_ptr_atomic.h b/libstdc++-v3/include/bits/shared_ptr_atomic.h index 94570cd3ab3..e903fe89424 100644 --- a/libstdc++-v3/include/bits/shared_ptr_atomic.h +++ b/libstdc++-v3/include/bits/shared_ptr_atomic.h @@ -356,7 +356,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #if __cplusplus >= 202002L # define __cpp_lib_atomic_shared_ptr 201711L template - class atomic; + struct atomic; template static constexpr bool __is_shared_ptr = false; @@ -368,7 +368,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { using value_type = _Tp; - friend class atomic<_Tp>; + friend struct atomic<_Tp>; // An atomic version of __shared_count<> and __weak_count<>. // Stores a _Sp_counted_base<>* but uses the LSB as a lock. @@ -602,7 +602,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION }; template - class atomic> + struct atomic> { public: using value_type = shared_ptr<_Tp>; @@ -725,7 +725,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION }; template - class atomic> + struct atomic> { public: using value_type = weak_ptr<_Tp>; diff --git a/libstdc++-v3/include/bits/stl_tree.h b/libstdc++-v3/include/bits/stl_tree.h index 7a352c17b22..6ced03252bc 100644 --- a/libstdc++-v3/include/bits/stl_tree.h +++ b/libstdc++-v3/include/bits/stl_tree.h @@ -1555,7 +1555,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION = _Rb_tree<_Key, _Val, _KeyOfValue, _Compare2, _Alloc>; template - friend class _Rb_tree_merge_helper; + friend struct _Rb_tree_merge_helper; /// Merge from a compatible container into one with unique keys. template diff --git a/libstdc++-v3/include/std/future b/libstdc++-v3/include/std/future index a1b2d7f1d3a..f1fa16c8649 100644 --- a/libstdc++-v3/include/std/future +++ b/libstdc++-v3/include/std/future @@ -623,10 +623,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION class _Async_state_impl; template - class _Task_state_base; + struct _Task_state_base; template - class _Task_state; + struct _Task_state; template diff --git a/libstdc++-v3/include/std/scoped_allocator b/libstdc++-v3/include/std/scoped_allocator index f2e3ed9f783..8ad4c90b694 100644 --- a/libstdc++-v3/include/std/scoped_allocator +++ b/libstdc++-v3/include/std/scoped_allocator @@ -165,7 +165,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return _M_inner == __other._M_inner; } private: - template friend class __inner_type_impl; + template friend struct __inner_type_impl; template friend class scoped_allocator_adaptor; __type _M_inner; @@ -187,7 +187,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION friend class scoped_allocator_adaptor; template - friend class __inner_type_impl; + friend struct __inner_type_impl; tuple _M_tie() const noexcept diff --git a/libstdc++-v3/include/std/valarray b/libstdc++-v3/include/std/valarray index 6f800d1b367..32e6e7e8a76 100644 --- a/libstdc++-v3/include/std/valarray +++ b/libstdc++-v3/include/std/valarray @@ -60,22 +60,22 @@ namespace __detail template class _Meta1, template class _Meta2, class _Dom1, class _Dom2> - class _BinClos; + struct _BinClos; template class _Meta, class _Dom> - class _SClos; + struct _SClos; template class _Meta, class _Dom> - class _GClos; + struct _GClos; template class _Meta, class _Dom> - class _IClos; + struct _IClos; template class _Meta, class _Dom> - class _ValFunClos; + struct _ValFunClos; template class _Meta, class _Dom> - class _RefFunClos; + struct _RefFunClos; } // namespace __detail using __detail::_UnClos;