[Bug bootstrap/82948] [8 Regression] prefix.c:202:15: error: 'char* strncpy(char*, const char*, size_t)' destination unchanged after copying no bytes [-Werror=stringop-truncation]

msebor at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sat Nov 11 17:44:00 GMT 2017


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82948

--- Comment #1 from Martin Sebor <msebor at gcc dot gnu.org> ---
Author: msebor
Date: Sat Nov 11 17:43:48 2017
New Revision: 254658

URL: https://gcc.gnu.org/viewcvs?rev=254658&root=gcc&view=rev
Log:
PR bootstrap/82948 - prefix.c:202:15: error: 'char* strncpy(char*, const char*,
   size_t)' destination unchanged after copying no bytes 

gcc/ChangeLog:

        PR bootstrap/82948
        * prefic.c (translate_name): Replace strncpy with memcpy to
        avoid -Wstringop-truncation.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/prefix.c


More information about the Gcc-bugs mailing list