[Bug c++/47444] False warning: array subscript is above array bounds
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Jan 24 21:32:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47444
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2011-01-24 21:17:15 UTC ---
if ( i>=SIZE && f1() )
throw 1;
bool v[SIZE] = { 1, 1 };
return v[i];
If f1 returns false, then you have above array bounds access.
>because constructor of struct A never called with "bad"
How can that be true if the compiler does not know that or could figure that
out?
More information about the Gcc-bugs
mailing list