[libcxx-commits] [libcxx] [libc++] Replace `__compressed_pair` with `[[no_unique_address]]` (PR #76756)
Pavel Labath via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Sep 30 11:55:25 PDT 2024
labath wrote:
Could be. I think that's the issue I am remembering. FWIW, the reproducer for this part is quite simple:
```
$ cat /tmp/a.cc
#include <string>
std::string s;
int main() {
return alignof(s);
}
$ bin/clang++ /tmp/a.cc -o /tmp/a.o -c -g -fstandalone-debug -stdlib=libc++ # Make sure libc++ uses the unstable ABI
/tmp/a.cc:6:10: warning: 'alignof' applied to an expression is a GNU extension [-Wgnu-alignof-expression]
6 | return alignof(s);
| ^
1 warning generated.
$ lldb /tmp/a.o -x -o 'script lldb.target.FindFirstType("::std::__2::string").GetByteAlign()'
(lldb) target create "/tmp/a.o"
Current executable set to '/tmp/a.o' (x86_64).
(lldb) script lldb.target.FindFirstType("::std::__2::string").GetByteAlign()
1
```
https://github.com/llvm/llvm-project/pull/76756
More information about the libcxx-commits
mailing list