Open
Description
In this example, there are two packed (and thus unaligned) structs, both of whom have an int
field where taking the address is dangerous, as I understand it:
https://godbolt.org/z/PdqaMoeof
But for some reason, -Waddress-of-packed-member
only flags the first one, and not the second. Is that intentional? I think they both run afoul of pointer alignment requirements. I noticed #23195 was filed back in 2016, but it was closed on grounds that Clang doesn't accept #pragma pack
.
It seems Clang now does, but the warning was never updated?