public inbox for libstdc++-cvs@sourceware.org help / color / mirror / Atom feed
From: Jonathan Wakely <redi@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r13-3618] libstdc++: Remove more redundant union members Date: Wed, 2 Nov 2022 20:33:21 +0000 (GMT) [thread overview] Message-ID: <20221102203322.381143858C74@sourceware.org> (raw) https://gcc.gnu.org/g:41602c85ac2414edfbca5c4b0ba520d47f0189ce commit r13-3618-g41602c85ac2414edfbca5c4b0ba520d47f0189ce Author: Jonathan Wakely <jwakely@redhat.com> Date: Wed Nov 2 12:52:34 2022 +0000 libstdc++: Remove more redundant union members 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. Diff: --- 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() { }
reply other threads:[~2022-11-02 20:33 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20221102203322.381143858C74@sourceware.org \ --to=redi@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ --cc=libstdc++-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).