https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84047
Martin Sebor <msebor at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[6/7/8 Regression] missing |[6/7/8 Regression] missing
|-Warray-bounds on a |-Warray-bounds on an
|negative offset into a |out-of-bounds index into an
|string |array
--- Comment #2 from Martin Sebor <msebor at gcc dot gnu.org> ---
Another test case with the same root cause, but this one with an array and a
small positive index:
char a[8];
int f (void)
{
const char *s = a + 4;
int i = 8;
return s[i]; // missing -Warray-bounds
}