[Bug c++/47444] False warning: array subscript is above array bounds
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Jan 25 11:09:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47444
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |WONTFIX
--- Comment #4 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-01-25 10:57:27 UTC ---
Well. You might argue that the wording should be 'may be' in all cases
where the offending statement might not be executed (which is certainly
undecidable as you can't know whether the function is executed at all).
But it also isn't the way we handle other warnings (in particular the
uninitialized variable uses).
Thus I think we should not fix this bug (and it is a non-bug, as certainly
the code in question isn't obviously dead).
Interprocedual analysis could see that we call the function with a boolean
value (thus, either 0 or 1).
That said - we can't suit everyone with this kind of warnings.
More information about the Gcc-bugs
mailing list