V2 [PATCH] c-family: Update unaligned adress of packed member check

2019-01-17 Thread H.J. Lu
On Thu, Jan 17, 2019 at 7:36 AM Jakub Jelinek wrote: > > On Wed, Jan 16, 2019 at 08:57:25PM -0800, H.J. Lu wrote: > > Check unaligned pointer conversion and strip NOPS. > > > -check_address_of_packed_member (tree type, tree rhs) > > +check_address_or_pointer_of_packed_member (tree type, tree rhs)

Re: V2 [PATCH] c-family: Update unaligned adress of packed member check

2019-01-17 Thread Jakub Jelinek
On Wed, Jan 16, 2019 at 08:57:25PM -0800, H.J. Lu wrote: > Check unaligned pointer conversion and strip NOPS. > -check_address_of_packed_member (tree type, tree rhs) > +check_address_or_pointer_of_packed_member (tree type, tree rhs) > { >if (INDIRECT_REF_P (rhs)) > rhs = TREE_OPERAND (rh

Re: V2 [PATCH] c-family: Update unaligned adress of packed member check

2019-01-17 Thread H.J. Lu
On Wed, Jan 16, 2019 at 8:57 PM H.J. Lu wrote: > > On Wed, Jan 16, 2019 at 01:28:26PM +0100, Jakub Jelinek wrote: > > On Wed, Jan 16, 2019 at 04:11:44AM -0800, H.J. Lu wrote: > > > > Why? What is so special about C and (implicit?) casts where the rhs > > > > isn't > > > > ADDR_EXPR? Aren't all

V2 [PATCH] c-family: Update unaligned adress of packed member check

2019-01-16 Thread H.J. Lu
On Wed, Jan 16, 2019 at 01:28:26PM +0100, Jakub Jelinek wrote: > On Wed, Jan 16, 2019 at 04:11:44AM -0800, H.J. Lu wrote: > > > Why? What is so special about C and (implicit?) casts where the rhs isn't > > > ADDR_EXPR? Aren't all casts (explicit or implicit) from one pointer type > > > to another