Greetings all, I just got this in my build output: ar: `u' modifier ignored since `D' is the default (see `U') configure: WARNING: cannot check for properly working vsnprintf when cross compiling, will assume it's ok ../../gcc/libiberty/dyn-string.c: In function ‘dyn_string_insert_cstr’: ../../gcc/libiberty/dyn-string.c:280:3: warning: ‘strncpy’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] strncpy (dest->s + pos, src, length); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../gcc/libiberty/dyn-string.c:272:16: note: length computed here 272 | int length = strlen (src); | ^~~~~~~~~~~~ ../../gcc/libiberty/dyn-string.c: In function ‘dyn_string_insert_cstr’: \ ../../gcc/libiberty/dyn-string.c:280:3: warning: ‘strncpy’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 280 | strncpy (dest->s + pos, src, length); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../gcc/libiberty/dyn-string.c:272:16: note: length computed here 272 | int length = strlen (src); | ^~~~~~~~~~~~
I've already looked through git blame and it seems this code was last touched in 2000. That warning seems to be new to gcc 8 after a little research so is this a rather old bug that was not found and very subtle or is this a mislabel. Seems to be a mislabel to me but I'm new to the code base so just thought I would ask. Cheers, Nick