* tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Avoid
undesirable warning.
From-SVN: r267454
+2018-12-28 Martin Sebor <msebor@redhat.com>
+
+ * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Avoid
+ undesirable warning.
+
2018-12-28 Thomas Schwinge <thomas@codesourcery.com>
* omp-expand.c (expand_omp_target): Restructure OpenACC vs. OpenMP
if (wi::to_wide (dstsize) != cntrange[1])
return false;
+ /* Avoid warning for strncpy(a, b, N) calls where the following
+ equalities hold:
+ N == sizeof a && N == sizeof b */
+ if (tree srcsize = compute_objsize (src, 1))
+ if (wi::to_wide (srcsize) == cntrange[1])
+ return false;
+
if (cntrange[0] == cntrange[1])
return warning_at (callloc, OPT_Wstringop_truncation,
"%G%qD specified bound %E equals destination size",