efriedma-quic wrote:

I didn't think so at first glance... but yes, we do, in certain obscure cases:

```
#include <new>
struct A { char c; A(); };
struct __attribute((packed)) S  { char a; int x; __attribute((aligned(2))) char 
y; consteval S() : x(1), a(3), y(2) {} };
struct S2 { [[no_unique_address]] S s; [[no_unique_address]] A a; };
static_assert(sizeof(S)==8 && sizeof(S2)==8);
void f2(S2 *s) { new (&s->s) S; }
```

I'll look into reworking this.

https://github.com/llvm/llvm-project/pull/93115
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to