Re: [PATCH] C-family: Only check the non-pointer data member

2019-01-14 Thread Jakub Jelinek
On Sun, Jan 13, 2019 at 06:54:05AM -0800, H.J. Lu wrote: > > What always matters is whether we take address of a packed structure > > field/non-static data member or whether we just read that field. > > The former should be warned about, the latter not. > > > > How about this patch? It checks if

Re: [PATCH] C-family: Only check the non-pointer data member

2019-01-13 Thread H.J. Lu
On Sun, Jan 13, 2019 at 5:20 AM Jakub Jelinek wrote: > > On Sun, Jan 13, 2019 at 04:48:38AM -0800, H.J. Lu wrote: > > When checking alignment of packed member, we should only check the > > non-pointer data member. > > > > gcc/c-family/ > > > > PR c++/88664 > > * c-family/c-warn.c (chec

Re: [PATCH] C-family: Only check the non-pointer data member

2019-01-13 Thread Jakub Jelinek
On Sun, Jan 13, 2019 at 04:48:38AM -0800, H.J. Lu wrote: > When checking alignment of packed member, we should only check the > non-pointer data member. > > gcc/c-family/ > > PR c++/88664 > * c-family/c-warn.c (check_alignment_of_packed_member): Only > check the non-pointer data

[PATCH] C-family: Only check the non-pointer data member

2019-01-13 Thread H.J. Lu
When checking alignment of packed member, we should only check the non-pointer data member. gcc/c-family/ PR c++/88664 * c-family/c-warn.c (check_alignment_of_packed_member): Only check the non-pointer data member. gcc/testsuite/ PR c++/88664 * gcc.dg/pr8