struct Foo { char c; int i; } __attribute__((packed)); int *foo(struct Foo *p) { return &p->i; } does not warn with -W -Wall -Wcast-align.
It does warn on STRICT_ALIGN targets though.
This could probably also be marked as a duplicate of bug 41809 (like bug 79918 was) since that one is older and it looks like the same issue.
Agreed, thanks. Note that GCC does not warn on this code on STRICT_ALIGNMENT targets (such as arm-linux-gnueabi.) *** This bug has been marked as a duplicate of bug 41809 ***