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

--- Comment #1 from Romain Geissler <romain.geissler at amadeus dot com> ---
This example emits:

error: ‘char* __builtin_strncpy(char*, const char*, long unsigned int)’ output
truncated before terminating nul copying 3 bytes from a string of the same
length [-Werror=stringop-truncation]
     return __builtin_strncpy(dest, source, size);
            ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors


while one would expect that no warning is emitted here.

Reply via email to