This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/70042] Room for optimization of x+1>y vs x>=y
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 02 Mar 2016 12:29:53 +0000
- Subject: [Bug c/70042] Room for optimization of x+1>y vs x>=y
- Auto-submitted: auto-generated
- References: <bug-70042-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70042
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Well, they are not equivalent ;) strlen returns a size_t variable and thus
strlen()+1 might wrap around zero ... (ok, insert argument here why
strlen() cannot return (size_t)~0 - terminating zero to the rescue!)
But I suppose your report wasn't about strlen() + 1 specifically?