https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85420
--- Comment #7 from Martin Sebor <msebor at gcc dot gnu.org> --- Whether that's a good or bad decision is a matter of opinion. Most coding guidelines advise against using strcpy even between distinct objects. I happen to think that's unnecessarily restrictive when the size of the destination is known to be large enough for the source string, but I do feel it's unsafe to use strcpy to copy substrings within the same array and that using memcpy is preferable. (The strengths and weaknesses of warnings and sanitizers are well known and don't need to be debated here.)