Re: [PATCH] avoid bogus -Wstringop-truncation when inlining (PR 84480)

2018-02-22 Thread Martin Sebor
On 02/21/2018 07:53 PM, Jeff Law wrote: On 02/21/2018 02:19 PM, Martin Sebor wrote: The attached patch eliminates -Wstringop-truncation false positives reported in bug 84480 - bogus -Wstringop-truncation despite assignment with an inlined string literal. It does that by delegating early strncpy

Re: [PATCH] avoid bogus -Wstringop-truncation when inlining (PR 84480)

2018-02-21 Thread Jeff Law
On 02/21/2018 02:19 PM, Martin Sebor wrote: > The attached patch eliminates -Wstringop-truncation false > positives reported in bug 84480 - bogus -Wstringop-truncation > despite assignment with an inlined string literal.  It does > that by delegating early strncpy checks during folding to > the sam

[PATCH] avoid bogus -Wstringop-truncation when inlining (PR 84480)

2018-02-21 Thread Martin Sebor
The attached patch eliminates -Wstringop-truncation false positives reported in bug 84480 - bogus -Wstringop-truncation despite assignment with an inlined string literal. It does that by delegating early strncpy checks during folding to the same machinery in tree-ssa-strlen that looks for a NUL a