[Bug c++/47444] False warning: array subscript is above array bounds
aj664 at hotmail dot com
gcc-bugzilla@gcc.gnu.org
Sat Mar 26 16:06:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47444
AJ <aj664 at hotmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |aj664 at hotmail dot com
--- Comment #11 from AJ <aj664 at hotmail dot com> 2011-03-26 15:58:08 UTC ---
not sure if this will help.
but i found this problem with -O2 optimzed code in GCC 4.5.1 (and 4.4.1)
example to show the kind of problem (not a literal testcase)
int a[8];
a[4] = 9;
issues an array-bounds warning, -Warray-bounds
seems to be confusing the array elements value with the array size.
if i have
a[4] = 7;
no error.
I hope that gives someone an idea about where to look for the problem.
(i haven't access to newer GCCs)
More information about the Gcc-bugs
mailing list