This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/47214] False warning "null argument where non-null required"
- 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, 11 Jan 2011 11:55:17 +0000
- Subject: [Bug c/47214] False warning "null argument where non-null required"
- Auto-submitted: auto-generated
- References: <bug-47214-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47214
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-01-11 11:55:08 UTC ---
The warning is at a level that doesn't see previous tests. Instead it sees
if (strcasecmp (s, i >= 0 && i <= last ? table[i] : 0B) == 0)
where it is not obvious that i >= 0 && i <= last is true. In fact, there
is no way to see that i <= last is true.