Re: PR79697: Delete calls to strdup, strndup, realloc if there is no lhs

2017-04-29 Thread Prathamesh Kulkarni
On 29 April 2017 at 01:37, Jeff Law wrote: > On 04/25/2017 12:06 AM, Prathamesh Kulkarni wrote: >> >> On 25 April 2017 at 02:41, Jeff Law wrote: >>> >>> On 02/25/2017 01:40 AM, Prathamesh Kulkarni wrote: Hi, The attached patch deletes calls to strdup, strndup if it's retu

Re: PR79697: Delete calls to strdup, strndup, realloc if there is no lhs

2017-04-28 Thread Jeff Law
On 04/25/2017 12:06 AM, Prathamesh Kulkarni wrote: On 25 April 2017 at 02:41, Jeff Law wrote: On 02/25/2017 01:40 AM, Prathamesh Kulkarni wrote: Hi, The attached patch deletes calls to strdup, strndup if it's return-value is unused, and same for realloc if the first arg is NULL. Bootstrap+tes

Re: PR79697: Delete calls to strdup, strndup, realloc if there is no lhs

2017-04-24 Thread Prathamesh Kulkarni
On 25 April 2017 at 02:41, Jeff Law wrote: > On 02/25/2017 01:40 AM, Prathamesh Kulkarni wrote: >> >> Hi, >> The attached patch deletes calls to strdup, strndup if it's >> return-value is unused, >> and same for realloc if the first arg is NULL. >> Bootstrap+tested on x86_64-unknown-linux-gnu. >>

Re: PR79697: Delete calls to strdup, strndup, realloc if there is no lhs

2017-04-24 Thread Jeff Law
On 02/25/2017 01:40 AM, Prathamesh Kulkarni wrote: Hi, The attached patch deletes calls to strdup, strndup if it's return-value is unused, and same for realloc if the first arg is NULL. Bootstrap+tested on x86_64-unknown-linux-gnu. OK for GCC 8 ? Thanks, Prathamesh pr79697-1.txt 2017-02-25

Re: PR79697: Delete calls to strdup, strndup, realloc if there is no lhs

2017-04-24 Thread Prathamesh Kulkarni
On 27 February 2017 at 00:10, Prathamesh Kulkarni wrote: > On 26 February 2017 at 05:16, Martin Sebor wrote: >> On 02/25/2017 11:54 AM, Prathamesh Kulkarni wrote: >>> >>> On 25 February 2017 at 14:43, Marc Glisse wrote: On Sat, 25 Feb 2017, Prathamesh Kulkarni wrote: > Hi, >>>

Re: PR79697: Delete calls to strdup, strndup, realloc if there is no lhs

2017-02-28 Thread Peter Bergner
On 2/28/17 12:49 PM, Peter Bergner wrote: > On 2/25/17 2:40 AM, Prathamesh Kulkarni wrote: >> The attached patch deletes calls to strdup, strndup if it's >> return-value is unused, >> and same for realloc if the first arg is NULL. > > Why limit ourselves to strdup and strndup? Can't we do the sam

Re: PR79697: Delete calls to strdup, strndup, realloc if there is no lhs

2017-02-28 Thread Peter Bergner
On 2/25/17 2:40 AM, Prathamesh Kulkarni wrote: > The attached patch deletes calls to strdup, strndup if it's > return-value is unused, > and same for realloc if the first arg is NULL. Why limit ourselves to strdup and strndup? Can't we do the same for all functions that are marked as const/pure s

Re: PR79697: Delete calls to strdup, strndup, realloc if there is no lhs

2017-02-26 Thread Prathamesh Kulkarni
On 26 February 2017 at 05:16, Martin Sebor wrote: > On 02/25/2017 11:54 AM, Prathamesh Kulkarni wrote: >> >> On 25 February 2017 at 14:43, Marc Glisse wrote: >>> >>> On Sat, 25 Feb 2017, Prathamesh Kulkarni wrote: >>> Hi, The attached patch deletes calls to strdup, strndup if it's

Re: PR79697: Delete calls to strdup, strndup, realloc if there is no lhs

2017-02-25 Thread Martin Sebor
On 02/25/2017 11:54 AM, Prathamesh Kulkarni wrote: On 25 February 2017 at 14:43, Marc Glisse wrote: On Sat, 25 Feb 2017, Prathamesh Kulkarni wrote: Hi, The attached patch deletes calls to strdup, strndup if it's return-value is unused, and same for realloc if the first arg is NULL. Bootstrap+

Re: PR79697: Delete calls to strdup, strndup, realloc if there is no lhs

2017-02-25 Thread Prathamesh Kulkarni
On 25 February 2017 at 14:43, Marc Glisse wrote: > On Sat, 25 Feb 2017, Prathamesh Kulkarni wrote: > >> Hi, >> The attached patch deletes calls to strdup, strndup if it's >> return-value is unused, >> and same for realloc if the first arg is NULL. >> Bootstrap+tested on x86_64-unknown-linux-gnu. >

Re: PR79697: Delete calls to strdup, strndup, realloc if there is no lhs

2017-02-25 Thread Marc Glisse
On Sat, 25 Feb 2017, Prathamesh Kulkarni wrote: Hi, The attached patch deletes calls to strdup, strndup if it's return-value is unused, and same for realloc if the first arg is NULL. Bootstrap+tested on x86_64-unknown-linux-gnu. OK for GCC 8 ? Instead of specializing realloc(0,*) wherever we c

PR79697: Delete calls to strdup, strndup, realloc if there is no lhs

2017-02-25 Thread Prathamesh Kulkarni
Hi, The attached patch deletes calls to strdup, strndup if it's return-value is unused, and same for realloc if the first arg is NULL. Bootstrap+tested on x86_64-unknown-linux-gnu. OK for GCC 8 ? Thanks, Prathamesh 2017-02-25 Prathamesh Kulkarni PR tree-optimization/79697 * tre