https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64450
Bug ID: 64450 Summary: Optimize 0>=p-q to q>=p for char*p,*q; Product: gcc Version: 5.0 Status: UNCONFIRMED Severity: enhancement Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: gcc-bugzilla at contacts dot eelis.net Created attachment 34365 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34365&action=edit Testcase It was noticed that Boost's iterator_facade incurred a performance penalty (while it should ideally be zero-overhead), which results from the fact that GCC does not optimize 0>=p-q to q>=p for char*p,*q;. See attachment. This probably applies to > and < and <= as well.