A new more precise warning exposed following: textcat.c: In function ‘textcat_ClassifyFull’: textcat.c:363:13: error: ‘memcpy’ accessing 16 bytes at offsets [0, 8] and [0, 8] overlaps between 8 and 16 bytes at offset [0, 8] [-Werror=restrict] memcpy(&candidates[cnt - 1], &candidates[i], sizeof(candidate_t)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@Stephan, I thought you might be interested in this issue...
Came across that with a fresh GCC trunk (towards GCC 9) build now, too. Looks like a legitimate warning to me, as it appears that cnt - 1 == i can be true. However, with a patch of "if (cnt - 1 != i)" around that memcpy, GCC still emits the warning, for which I now filed <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86196> "Bogus -Wrestrict on memcpy".
SInce the issue has been reported in the GCC bugtracker, we can close this one as RESOLVED MOVED
(<https://gerrit.libreoffice.org/#/c/58173/> "Work around GCC trunk (towards GCC 9) bug for now" can be pushed should the GCC bug not get fixed in time for GCC 9)