[Bug middle-end/85602] -Wsizeof-pointer-memaccess for strncat with size of source
eggert at gnu dot org
gcc-bugzilla@gcc.gnu.org
Mon May 14 19:37:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85602
--- Comment #2 from Paul Eggert <eggert at gnu dot org> ---
Thanks for looking into it. For what it's worth, the practical effect of this
new warning was that I changed that part of coreutils to not use strncat,
causing 3 lines of code to grow to 8 lines. See the end of:
https://git.savannah.gnu.org/cgit/coreutils.git/commit/?id=9781fcd532f30afe174239a22816a83c40528b27
Another part of coreutils still uses strncat (also correctly). Let's hope GCC
doesn't start warning about it too....
More information about the Gcc-bugs
mailing list