[libcxx-commits] [PATCH] D122598: [libcxx] avoid using anonymous struct with base classes (fixes gcc-12)
Louis Dionne via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Apr 5 14:31:59 PDT 2022
ldionne added inline comments.
================
Comment at: libcxx/include/string:690
value_type __data_[__min_cap];
- struct
- : __padding<value_type>
- {
- unsigned char __size_;
- };
+ char __padding[sizeof(value_type) - 1];
+ unsigned char __size_;
----------------
azat wrote:
> ldionne wrote:
> > This should be `unsigned char __padding[...]`. It doesn't change anything, but it makes it clearer that we're padding the `unsigned char __size_` member that follows.
> So I should made this change once https://reviews.llvm.org/D123081 will land, right?
You can make this change right now, it's just that I'd like to confirm that we'd catch any issue with this patch before actually landing it in the tree!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D122598/new/
https://reviews.llvm.org/D122598
More information about the libcxx-commits
mailing list