https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85259
Martin Sebor <msebor at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Known to work| |9.0 Resolution|--- |FIXED Summary|[8/9 Regression] Missing |[8 Regression] Missing |-Wstringop-overflow= since |-Wstringop-overflow= since |r256683 |r256683 --- Comment #8 from Martin Sebor <msebor at gcc dot gnu.org> --- This is fixed in 9.0 which prints: In file included from /usr/include/string.h:635, from pr85259.c:1: In function ‘strcpy’, inlined from ‘main’ at pr85259.c:5:2: /usr/include/bits/string3.h:110:10: warning: ‘__builtin___memcpy_chk’ forming offset 7 is out of the bounds [0, 6] of object ‘buf’ with type ‘char[6]’ [-Warray-bounds] 110 | return __builtin___strcpy_chk (__dest, __src, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ pr85259.c: In function ‘main’: pr85259.c:3:6: note: ‘buf’ declared here 3 | char buf[6]; | ^~~ In file included from /usr/include/string.h:635, from pr85259.c:1: In function ‘strcat’, inlined from ‘main’ at pr85259.c:6:2: /usr/include/bits/string3.h:148:10: warning: ‘__builtin___memcpy_chk’ writing 7 bytes into a region of size 0 overflows the destination [-Wstringop-overflow=] 148 | return __builtin___strcat_chk (__dest, __src, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Per comment #4, fixes for missing warnings are not backported, even if they are regressions, so I'll resolve this as fixed.