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++/38986] comparing lengths of 2 strings reads through both strings completely



------- Comment #2 from esigra at gmail dot com  2009-01-30 16:12 -------
GCC already understands the semantics of strlen. If one of the operands to "<"
is a constant and the other is strlen, it is optimized (such as "strlen(str) >=
1). It just seems like the case with strlen on both sides is missing.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38986


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