From patchwork Wed Aug 9 14:22:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 133281 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c44e:0:b0:3f2:4152:657d with SMTP id w14csp2836752vqr; Wed, 9 Aug 2023 07:26:52 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE4fqU2wXl1MJ4+0ruwegJZuhGyNZ936mE9L+zKdGV+fDOegw0Pm095bWo7+cfoC3Pg7ZaR X-Received: by 2002:a17:906:1010:b0:992:bc8:58e4 with SMTP id 16-20020a170906101000b009920bc858e4mr1816785ejm.20.1691591212288; Wed, 09 Aug 2023 07:26:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691591212; cv=none; d=google.com; s=arc-20160816; b=lglyouhdDENDkPp8QyJ09FNvhkciwfhfaWY0B9N72gGMTVJ0G4NQ1I0i2/R7wVBl/e uYb+hISN8Yv9+fwZC0ZIsF6tTWDgdQrSrxO8SCTastyFasvFQErddd970iTt/UbSpHyT oSfS7Ox26w9RpIlF2ZNUZiQKkjzwO6AnUt5Ov2z229OcqxJmIxoXYiJPV9pdX9AYCIdX UgTCJiXbbMppWH6HusaNKJifngQ5LV8FeWBawuhfWV5EZ6CR+mu2GLksHPqOp6glU4Lg UonPWZR9qWpHKtfoKffhs4A6kTLT4oN6kHzJYLf/btGkQQNTo9Rt6hkn7iIcQOqBNhLU mA/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:message-id:date:subject:to :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=4ZNGjYBguH7Hbfxf9Ccj6KpRq4Ij10sHIZixCk/GyJY=; fh=sC8lnOfyH6gL5FYlMbZ1VDz6qVPMj/3ViLJWKNUCUgQ=; b=OuJBRWRNjM3VnWoPsF3ItWG7tdDKXnnerDRedNIMOcFtFhQ0I00e6xxSW5yMSdvPAq jRXMFFtWTy2m3jpbKhmZTokxMBx5IR4mqJ6lwVIDY3592TJSKDDK99UVL64j0Mtrm9vY N5WBZ2wFuI/58cODoN5vn4TZXUKuDLZV8IEyjC5veAzHB/3mMNlGikbhJLbBwufHSCtq u2KjqF7jNzXInvMMprFn5YE5vYv8bq/iSklFG32etv6EIJPG98+DAYlQB1QOtJJyZ739 8a5E49LYDq573MHaPgmgfbi7lQuMAl2/ZNJUC2oERz88gfbpBTev8oe91tG1TcST6Fh7 J3OQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=tqeXUTbu; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id b7-20020a17090636c700b0098d7e44a637si9381571ejc.794.2023.08.09.07.26.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Aug 2023 07:26:52 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=tqeXUTbu; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id CA2FC382CD5A for ; Wed, 9 Aug 2023 14:23:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CA2FC382CD5A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1691591039; bh=4ZNGjYBguH7Hbfxf9Ccj6KpRq4Ij10sHIZixCk/GyJY=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=tqeXUTbu6YdXKpAP81e7VwTdDn7BbjzH3cG6UQQ50FOTfHyKZePwm6/gHOAvzTbCk x6nbrAbnr4TAYb3v7+YQMh/lTWnFA0wN8EcojXgDLTSALUQrx7ektDFAtKrk/rMTEb katqVrj/CuntuTlgFssGRG/8pixicgDu/hKZCsN4= 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.129.124]) by sourceware.org (Postfix) with ESMTPS id 4EDCA385DC13 for ; Wed, 9 Aug 2023 14:22:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4EDCA385DC13 Received: from mimecast-mx02.redhat.com (66.187.233.73 [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-315-RiHikS4oNoOhtA9Vt4jN-g-1; Wed, 09 Aug 2023 10:22:43 -0400 X-MC-Unique: RiHikS4oNoOhtA9Vt4jN-g-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 8CA4B280AA30; Wed, 9 Aug 2023 14:22:41 +0000 (UTC) Received: from localhost (unknown [10.42.28.187]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1C2E8C15BAE; Wed, 9 Aug 2023 14:22:40 +0000 (UTC) To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [committed] libstdc++: Fix some -Wmismatched-tags warnings Date: Wed, 9 Aug 2023 15:22:35 +0100 Message-ID: <20230809142240.1015004-1-jwakely@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 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, T_FILL_THIS_FORM_SHORT 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.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Jonathan Wakely via Gcc-patches From: Jonathan Wakely Reply-To: Jonathan Wakely Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773761946882485117 X-GMAIL-MSGID: 1773761946882485117 Tested x86_64-linux. Pushed to trunk. -- >8 -- 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/chrono (tzdb_list::_Node): Likewise. * 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. --- libstdc++-v3/include/bits/shared_ptr_atomic.h | 8 ++++---- libstdc++-v3/include/bits/stl_tree.h | 2 +- libstdc++-v3/include/std/chrono | 6 +++--- libstdc++-v3/include/std/future | 4 ++-- libstdc++-v3/include/std/scoped_allocator | 4 ++-- libstdc++-v3/include/std/valarray | 12 ++++++------ 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/libstdc++-v3/include/bits/shared_ptr_atomic.h b/libstdc++-v3/include/bits/shared_ptr_atomic.h index 3f921d311d6..b56b8153a89 100644 --- a/libstdc++-v3/include/bits/shared_ptr_atomic.h +++ b/libstdc++-v3/include/bits/shared_ptr_atomic.h @@ -358,7 +358,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #if __cplusplus >= 202002L # define __cpp_lib_atomic_shared_ptr 201711L template - class atomic; + struct atomic; /** * @addtogroup pointer_abstractions @@ -376,7 +376,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. @@ -610,7 +610,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION }; template - class atomic> + struct atomic> { public: using value_type = shared_ptr<_Tp>; @@ -733,7 +733,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 3c331fbc952..f870f3dfa53 100644 --- a/libstdc++-v3/include/bits/stl_tree.h +++ b/libstdc++-v3/include/bits/stl_tree.h @@ -1554,7 +1554,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/chrono b/libstdc++-v3/include/std/chrono index 9b160488afa..e63d6c71b4a 100644 --- a/libstdc++-v3/include/std/chrono +++ b/libstdc++-v3/include/std/chrono @@ -2792,7 +2792,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION private: friend const tzdb& reload_tzdb(); - friend class tzdb_list::_Node; + friend struct tzdb_list::_Node; explicit time_zone_link(nullptr_t) { } @@ -2896,7 +2896,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION private: explicit leap_second(seconds::rep __s) : _M_s(__s) { } - friend class tzdb_list::_Node; + friend struct tzdb_list::_Node; friend const tzdb& reload_tzdb(); @@ -2937,7 +2937,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION private: friend const tzdb& reload_tzdb(); friend class time_zone; - friend class tzdb_list::_Node; + friend struct tzdb_list::_Node; }; tzdb_list& get_tzdb_list(); diff --git a/libstdc++-v3/include/std/future b/libstdc++-v3/include/std/future index b94ae0b679b..c46ead742c3 100644 --- a/libstdc++-v3/include/std/future +++ b/libstdc++-v3/include/std/future @@ -625,10 +625,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 cb15c8cc7dd..8af432ada42 100644 --- a/libstdc++-v3/include/std/scoped_allocator +++ b/libstdc++-v3/include/std/scoped_allocator @@ -164,7 +164,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; @@ -186,7 +186,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 6bd23e0914b..f172db6c623 100644 --- a/libstdc++-v3/include/std/valarray +++ b/libstdc++-v3/include/std/valarray @@ -62,22 +62,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;