From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id CF4283858C74 for ; Wed, 2 Nov 2022 20:33:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org CF4283858C74 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1667421215; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=29oWfHIWTK4U5YydhvdctPVQhUwvDjxOx6QyelW6z/M=; b=IXhoK76M9G/Aw/YOrJE5VZu6bhel570WjhvWdf7QCGDQJjD3hS0Z92Um/yezdpId6KrHvH iYU8kqfrv4N8byrt53oGKvHrBlJ5/4GLH3o4y6k1FTmOa/lteGO1y8PrPHHyqPVA6GR56d F6DFaCrllF5Xv4frkCC3Ew4toIv4AwU= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-86-cYwQGRaLOGeAgDLNXoYL1g-1; Wed, 02 Nov 2022 16:33:33 -0400 X-MC-Unique: cYwQGRaLOGeAgDLNXoYL1g-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5D465185A78F; Wed, 2 Nov 2022 20:33:33 +0000 (UTC) Received: from localhost (unknown [10.33.37.13]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2838040C94AA; Wed, 2 Nov 2022 20:33:33 +0000 (UTC) From: Jonathan Wakely To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [committed] libstdc++: Remove more redundant union members Date: Wed, 2 Nov 2022 20:33:32 +0000 Message-Id: <20221102203332.672558-1-jwakely@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.3 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_H2,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Tested powerpc64le-linux. Pushed to trunk. -- >8 -- We don't need these 'unused' members because they're never used, and a union with a single variant member is fine. libstdc++-v3/ChangeLog: * libsupc++/eh_globals.cc (constant_init::unused): Remove. * src/c++11/system_error.cc (constant_init::unused): Remove. * src/c++17/memory_resource.cc (constant_init::unused): Remove. --- libstdc++-v3/libsupc++/eh_globals.cc | 1 - libstdc++-v3/src/c++11/system_error.cc | 1 - libstdc++-v3/src/c++17/memory_resource.cc | 1 - 3 files changed, 3 deletions(-) diff --git a/libstdc++-v3/libsupc++/eh_globals.cc b/libstdc++-v3/libsupc++/eh_globals.cc index 0aadb692a96..12abfc10521 100644 --- a/libstdc++-v3/libsupc++/eh_globals.cc +++ b/libstdc++-v3/libsupc++/eh_globals.cc @@ -73,7 +73,6 @@ namespace struct constant_init { union { - unsigned char unused; __cxa_eh_globals obj; }; constexpr constant_init() : obj() { } diff --git a/libstdc++-v3/src/c++11/system_error.cc b/libstdc++-v3/src/c++11/system_error.cc index 8c13642408d..5707e6b61d6 100644 --- a/libstdc++-v3/src/c++11/system_error.cc +++ b/libstdc++-v3/src/c++11/system_error.cc @@ -49,7 +49,6 @@ namespace struct constant_init { union { - unsigned char unused; T obj; }; constexpr constant_init() : obj() { } diff --git a/libstdc++-v3/src/c++17/memory_resource.cc b/libstdc++-v3/src/c++17/memory_resource.cc index 8bc55a69f1f..651d07489aa 100644 --- a/libstdc++-v3/src/c++17/memory_resource.cc +++ b/libstdc++-v3/src/c++17/memory_resource.cc @@ -82,7 +82,6 @@ namespace pmr struct constant_init { union { - unsigned char unused; T obj; }; constexpr constant_init() : obj() { } -- 2.38.1