https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98503
--- Comment #10 from Martin Sebor <msebor at gcc dot gnu.org> --- The main purpose of the "partly outside" warning is to detect reads/writes that cross the trailing array boundary. Those typically come up when a "typeless" buffer (either char array or one allocated by a function like malloc) is used to store a sequence of heterogeneous elements. Besides these bugs the warning also detects other kinds of invalid accesses that span the boundary, like in comment #0. The access there in invalid for a different reason than the usual -Warray-bounds, so issuing a warning that's controlled by a different option would be appropriate (-Wstrict-aliasing seems like a good fit). It's something we have discussed doing but it's not at the top my to do list. Making it conditional on -fstrict-aliasing might be worth considering as well.