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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Well, strlen returns unsigned value (size_t), so unless we take into
consideration some special properties of strlen, the two are not equivalent.
If you replace strlen with an arbitrary function returning size_t, if it
returns ~(size_t) 0, then that is >= 108, but (~(size_t) 0) + 1 < 108.
If you want somehow special strlen, what would it be?  Claim that the maximum
possible string length is at most ~(size_t) 0 minus some epsilon, by saying
that you need to leave memory in the VA left for other purposes?

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