This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/70042] Room for optimization of x+1>y vs x>=y


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?

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]