https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84212
Martin Sebor <msebor at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |diagnostic Status|UNCONFIRMED |NEW Last reconfirmed| |2018-02-05 CC| |msebor at gcc dot gnu.org See Also| |https://gcc.gnu.org/bugzill | |a/show_bug.cgi?id=71907, | |https://gcc.gnu.org/bugzill | |a/show_bug.cgi?id=78768, | |https://gcc.gnu.org/bugzill | |a/show_bug.cgi?id=79062 Ever confirmed|0 |1 Known to fail| |7.3.0, 8.0 --- Comment #1 from Martin Sebor <msebor at gcc dot gnu.org> --- Confirmed with both 7.x where -Wstringop-overflow was first introduced and with 8.0, so it's not a regression. (A false positive would be, independent of this bug, if a test case is provided that reproduces it.) Prior to the introduction of -Wstringop-overflow GCC would print the same warning (minus the sizes) but with no option to suppress it. $ (gcc -D_FORTIFY_SOURCE=2 -O3 -flto'; $gcc -c a.c b.c && gcc a.o b.o) In function ‘memset’, inlined from ‘main’ at a.c:4:2: /usr/include/bits/string3.h:90:10: warning: call to __builtin___memset_chk will always overflow destination buffer return __builtin___memset_chk (__dest, __ch, __len, __bos0 (__dest)); ^ See also pr71907, pr78768, and pr79062, for other problems with the interaction of -flto and some of these middle-end options.