Re: [PATCH] handle sprintf(d, "%s", ...) in gimple-ssa-sprintf.c

2017-05-12 Thread Jeff Law
On 05/03/2017 08:46 AM, Martin Sebor wrote: On 05/03/2017 04:20 AM, Richard Biener wrote: On Tue, May 2, 2017 at 4:41 PM, Martin Sebor wrote: FWIW, my fix for bug 79062 is only partial (it gets the pass to run but the warnings are still not issued). I don't quite understand what prevents the

Re: [PATCH] handle sprintf(d, "%s", ...) in gimple-ssa-sprintf.c

2017-05-03 Thread Martin Sebor
On 05/03/2017 04:20 AM, Richard Biener wrote: On Tue, May 2, 2017 at 4:41 PM, Martin Sebor wrote: FWIW, my fix for bug 79062 is only partial (it gets the pass to run but the warnings are still not issued). I don't quite understand what prevents the warning flag(s) from getting set when -flto i

Re: [PATCH] handle sprintf(d, "%s", ...) in gimple-ssa-sprintf.c

2017-05-03 Thread Richard Biener
On Tue, May 2, 2017 at 4:41 PM, Martin Sebor wrote: FWIW, my fix for bug 79062 is only partial (it gets the pass to run but the warnings are still not issued). I don't quite understand what prevents the warning flag(s) from getting set when -flto is used. This seems to be a b

Re: [PATCH] handle sprintf(d, "%s", ...) in gimple-ssa-sprintf.c

2017-05-02 Thread Martin Sebor
FWIW, my fix for bug 79062 is only partial (it gets the pass to run but the warnings are still not issued). I don't quite understand what prevents the warning flag(s) from getting set when -flto is used. This seems to be a bigger problem than just the sprintf pass not doing something just right.

Re: [PATCH] handle sprintf(d, "%s", ...) in gimple-ssa-sprintf.c

2017-05-02 Thread Richard Biener
On Fri, Apr 28, 2017 at 6:35 PM, Jeff Law wrote: > On 04/25/2017 09:55 PM, Martin Sebor wrote: >> >> On 04/25/2017 04:05 PM, Jeff Law wrote: >>> >>> On 04/21/2017 03:33 PM, Martin Sebor wrote: Bug 77671 - missing -Wformat-overflow warning on sprintf overflow with "%s", is caused by

Re: [PATCH] handle sprintf(d, "%s", ...) in gimple-ssa-sprintf.c

2017-04-28 Thread Jeff Law
On 04/27/2017 07:35 PM, Martin Sebor wrote: On 04/25/2017 09:55 PM, Martin Sebor wrote: On 04/25/2017 04:05 PM, Jeff Law wrote: On 04/21/2017 03:33 PM, Martin Sebor wrote: I think I may have included the (partial) the fix for 79062 to get some tests to pass but I'm not 100% sure. The follow

Re: [PATCH] handle sprintf(d, "%s", ...) in gimple-ssa-sprintf.c

2017-04-28 Thread Jeff Law
On 04/25/2017 09:55 PM, Martin Sebor wrote: On 04/25/2017 04:05 PM, Jeff Law wrote: On 04/21/2017 03:33 PM, Martin Sebor wrote: Bug 77671 - missing -Wformat-overflow warning on sprintf overflow with "%s", is caused by gimple-fold.c transforming s{,n}printf calls with a plain "%s" format string

Re: [PATCH] handle sprintf(d, "%s", ...) in gimple-ssa-sprintf.c

2017-04-27 Thread Martin Sebor
On 04/25/2017 09:55 PM, Martin Sebor wrote: On 04/25/2017 04:05 PM, Jeff Law wrote: On 04/21/2017 03:33 PM, Martin Sebor wrote: Bug 77671 - missing -Wformat-overflow warning on sprintf overflow with "%s", is caused by gimple-fold.c transforming s{,n}printf calls with a plain "%s" format string

Re: [PATCH] handle sprintf(d, "%s", ...) in gimple-ssa-sprintf.c

2017-04-25 Thread Martin Sebor
On 04/25/2017 04:05 PM, Jeff Law wrote: On 04/21/2017 03:33 PM, Martin Sebor wrote: Bug 77671 - missing -Wformat-overflow warning on sprintf overflow with "%s", is caused by gimple-fold.c transforming s{,n}printf calls with a plain "%s" format string into strcpy regardless of whether they are va

Re: [PATCH] handle sprintf(d, "%s", ...) in gimple-ssa-sprintf.c

2017-04-25 Thread Jeff Law
On 04/21/2017 03:33 PM, Martin Sebor wrote: Bug 77671 - missing -Wformat-overflow warning on sprintf overflow with "%s", is caused by gimple-fold.c transforming s{,n}printf calls with a plain "%s" format string into strcpy regardless of whether they are valid well before the -Wformtat-overflow wa

[PATCH] handle sprintf(d, "%s", ...) in gimple-ssa-sprintf.c

2017-04-21 Thread Martin Sebor
Bug 77671 - missing -Wformat-overflow warning on sprintf overflow with "%s", is caused by gimple-fold.c transforming s{,n}printf calls with a plain "%s" format string into strcpy regardless of whether they are valid well before the -Wformtat-overflow warning has had a chance to validate them. The