This patch improves the packed member warning by showing the name of the anonymous structure/union when it was defined with a typedef, e.g. the code below:
typedef struct { char c; int x; } __attribute__((packed)) Foo; int *foo(Foo *f) { return &f->x; }
Would now produce the following warning:
taking address of packed member 'x' of class or structure 'Foo' may result in an unaligned pointer value