http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49283
--- Comment #2 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-06-06 10:38:33 UTC --- 1) Line 2026 contains the expression (p < buff + sizeof buff - 1) GCC only looks at local tuple stmts when emitting the warning, so I suppose it sees sth like p = &buff[...]; p = p + 3; (p < buff + sizeof buff - 1) and then optimizes the last two stmts as p + 3 < buff + sizeof buff - 1 moving the + 3 from the LHS and combining it with the constant offset on the RHS. That is only valid if p + 3 does not get outside of buff which GCC doesn't see (it would also be invalid, but that is what the option tries to catch - so, catch22).