https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82612
Martin Sebor changed:
What|Removed |Added
Status|ASSIGNED|RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82612
--- Comment #4 from Martin Sebor ---
Author: msebor
Date: Tue Nov 5 16:20:44 2019
New Revision: 277851
URL: https://gcc.gnu.org/viewcvs?rev=277851=gcc=rev
Log:
PR middle-end/92341 - missing -Warray-bounds indexing past the end of a
compound
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82612
Martin Sebor changed:
What|Removed |Added
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82612
--- Comment #2 from Martin Sebor ---
I realize there's no ARRAY_REF but users unfamiliar with GCC internals don't,
nor would they care. I'm less concerned about code that defeats the type
system by using casts (though it would be nice to
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82612
--- Comment #1 from Richard Biener ---
But we are not even having an ARRAY_REF in the IL ...
So try
int g (int i)
{
int (*p)[2] = (int (*)[2])
return (*p)[2];
}
where we also do not warn. Or the VLA variant:
int g (int i, int n)
{