[libcxx-commits] [PATCH] D122598: [libcxx] avoid using anonymous struct with base classes (fixes gcc-12)

Azat Khuzhin via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Mar 28 10:34:31 PDT 2022


azat created this revision.
Herald added a project: All.
azat requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.

g++-12 reports:

  libcxx/include/string:727:13: error: anonymous struct with base classes
    727 |             : __padding<value_type>


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D122598

Files:
  libcxx/include/string


Index: libcxx/include/string
===================================================================
--- libcxx/include/string
+++ libcxx/include/string
@@ -703,8 +703,8 @@
     {
         value_type __data_[__min_cap];
         struct
-            : __padding<value_type>
         {
+            __padding<value_type> __padding_;
             unsigned char __size_;
         };
     };


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D122598.418641.patch
Type: text/x-patch
Size: 383 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220328/415bc673/attachment.bin>


More information about the libcxx-commits mailing list