Re: [PATCH] avoid warning for memcpy to self (PR 83456)

2018-03-16 Thread H.J. Lu
On Wed, Mar 7, 2018 at 3:01 PM, Martin Sebor wrote: > I have become convinced that issuing -Wrestrict in gimple-fold > for calls to memcpy() where the source pointer is the same as > the destination causes more trouble than it's worth, especially > when inlining is involved, as in: > > inline vo

Re: [PATCH] avoid warning for memcpy to self (PR 83456)

2018-03-09 Thread Jeff Law
On 03/08/2018 05:46 PM, Martin Sebor wrote: > On 03/08/2018 01:59 AM, Richard Biener wrote: >> On Thu, Mar 8, 2018 at 12:01 AM, Martin Sebor  wrote: >>> I have become convinced that issuing -Wrestrict in gimple-fold >>> for calls to memcpy() where the source pointer is the same as >>> the destinati

Re: [PATCH] avoid warning for memcpy to self (PR 83456)

2018-03-08 Thread Martin Sebor
On 03/08/2018 01:59 AM, Richard Biener wrote: On Thu, Mar 8, 2018 at 12:01 AM, Martin Sebor wrote: I have become convinced that issuing -Wrestrict in gimple-fold for calls to memcpy() where the source pointer is the same as the destination causes more trouble than it's worth, especially when in

Re: [PATCH] avoid warning for memcpy to self (PR 83456)

2018-03-08 Thread Richard Biener
On Thu, Mar 8, 2018 at 12:01 AM, Martin Sebor wrote: > I have become convinced that issuing -Wrestrict in gimple-fold > for calls to memcpy() where the source pointer is the same as > the destination causes more trouble than it's worth, especially > when inlining is involved, as in: > > inline v

[PATCH] avoid warning for memcpy to self (PR 83456)

2018-03-07 Thread Martin Sebor
I have become convinced that issuing -Wrestrict in gimple-fold for calls to memcpy() where the source pointer is the same as the destination causes more trouble than it's worth, especially when inlining is involved, as in: inline void bar (void *d, void *s, unsigned N) { if (s != d)