[Bug c/44300] Spurious array subscript warning

jmattson at vmware dot com gcc-bugzilla@gcc.gnu.org
Fri May 28 16:53:00 GMT 2010



------- Comment #9 from jmattson at vmware dot com  2010-05-28 16:53 -------
Okay.  What if we stick with equality operators, then?

static inline void
foo(int *p)
{
   if (p == a + 1 || p == a + 2) {
      p[-1] = 0;
   }
}

This code results in the same warning.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44300



More information about the Gcc-bugs mailing list