Re: [PATCH] Fix bogus strncpy source length warning on source bound by constant

2018-03-13 Thread Siddhesh Poyarekar
On Monday 12 March 2018 03:26 PM, Richard Biener wrote: > Please use tree_int_cst_lt (rhs1, dstsize) instead. > >> + { >> + gimple_set_no_warning (stmt, true); > > Why this? There's only a single bit -- where do we warn from if you > don't do this here? I incorrectly thoug

Re: [PATCH] Fix bogus strncpy source length warning on source bound by constant

2018-03-12 Thread Richard Biener
On Sun, Mar 11, 2018 at 4:22 PM, Siddhesh Poyarekar wrote: > Avoid issuing a bogus warning when the source of strncpy is bound by a > constant and is known to be less than the size of the destination. > > Testsuite run is underway (not complete yet, but no new errors so far) > and a bootstrap is a