This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/44300] Spurious array subscript warning
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 May 2010 10:30:00 -0000
- Subject: [Bug c/44300] Spurious array subscript warning
- References: <bug-44300-19243@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from rguenth at gcc dot gnu dot org 2010-05-28 10:30 -------
GCC sees at the point of the warning
if (&b > &a && &b[0] < &a[10])
b[-1] = 0;
and it cannot statically determine those comparisons.
So it warns (IMHO correctly). This is very unlikely going to be fixed.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |diagnostic
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44300