https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68816
Martin Sebor <msebor at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Last reconfirmed|2015-12-09 00:00:00 | CC| |msebor at gcc dot gnu.org Resolution|--- |INVALID --- Comment #5 from Martin Sebor <msebor at gcc dot gnu.org> --- GCC warns for this case with -O2 -Wstrict-overflow=3 so I think this bug can be closed as invalid. $ cat x.c && /build/gcc-trunk-svn/gcc/xgcc -B /build/gcc-trunk-svn/gcc -O2 -S -Wstrict-overflow=3 -xc++ x.c extern void g( const char *); void f( const char * start, unsigned long ul) { if (start + ul < start) g( start); } x.c: In function ‘void f(const char*, long unsigned int)’: x.c:8:1: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow] } ^