https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117179
--- Comment #9 from Sam James <sjames at gcc dot gnu.org> --- (In reply to qinzhao from comment #8) > for the reduced testing case, with my work-in-progress 3rd version of the > patch + -fdiagnostics-explain-harder: > t.c:15:15: warning: array subscript [0, 2] is outside array bounds of ‘const > char *[2]’ [-Warray-bounds=] > 15 | if (commands[comind] == "b" && > | ~~~~~~~~^~~~~~~~ > ‘setval_internal_tilde’: events 1-2 > 4 | if (comind > sizeof(commands)/sizeof(commands[0])) { > | ^ > | | > | (1) t.c:15:24: warning: when the condition is evaluated > to true > ...... Showing the inline event here for the condition is very helpful indeed and would make me happy, I think.