]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Remove more redundant union members
authorJonathan Wakely <jwakely@redhat.com>
Wed, 2 Nov 2022 12:52:34 +0000 (12:52 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Wed, 2 Nov 2022 20:33:03 +0000 (20:33 +0000)
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
libstdc++-v3/src/c++11/system_error.cc
libstdc++-v3/src/c++17/memory_resource.cc

index 0aadb692a962516f037a5080ef36dfb17f9cd3ea..12abfc1052173006255ba17265f69eaf5cfcf96f 100644 (file)
@@ -73,7 +73,6 @@ namespace
   struct constant_init
   {
     union {
-      unsigned char unused;
       __cxa_eh_globals obj;
     };
     constexpr constant_init() : obj() { }
index 8c13642408de05638830608f99854bdf3bdfe146..5707e6b61d693265f01d7ee7c40d426a9e49c7e0 100644 (file)
@@ -49,7 +49,6 @@ namespace
     struct constant_init
     {
       union {
-       unsigned char unused;
        T obj;
       };
       constexpr constant_init() : obj() { }
index 8bc55a69f1f07b39dada2f1f2df1e51d6a8fd9a4..651d07489aafccfaaf743a1e8c53924637c1e480 100644 (file)
@@ -82,7 +82,6 @@ namespace pmr
       struct constant_init
       {
        union {
-         unsigned char unused;
          T obj;
        };
        constexpr constant_init() : obj() { }