public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-3618] libstdc++: Remove more redundant union members
@ 2022-11-02 20:33 Jonathan Wakely
0 siblings, 0 replies; only message in thread
From: Jonathan Wakely @ 2022-11-02 20:33 UTC (permalink / raw)
To: gcc-cvs, libstdc++-cvs
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() { }
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-11-02 20:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-02 20:33 [gcc r13-3618] libstdc++: Remove more redundant union members Jonathan Wakely
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).