This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/47444] False warning: array subscript is above array bounds
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 25 Jan 2011 10:57:30 +0000
- Subject: [Bug c++/47444] False warning: array subscript is above array bounds
- Auto-submitted: auto-generated
- References: <bug-47444-4@http.gcc.gnu.org/bugzilla/>
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.