https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82583
Martin Sebor <msebor at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution|--- |FIXED --- Comment #4 from Martin Sebor <msebor at gcc dot gnu.org> --- Fixed in r254830. GCC now issues the warnings below for the test case in comment #0: a.c: In function ‘f’: a.c:6:12: warning: array subscript 4 is above array bounds of ‘int[4]’ [-Warray-bounds] p->a[1].a[4] = 1; ~~~~~~~~~^~~ a.c: In function ‘g’: a.c:11:7: warning: array subscript 2 is above array bounds of ‘struct A[2]’ [-Warray-bounds] p->a[2].a[3] = 1; ~~~~^~~