[Bug c++/38986] comparing lengths of 2 strings reads through both strings completely

esigra at gmail dot com gcc-bugzilla@gcc.gnu.org
Fri Jan 30 16:13:00 GMT 2009



------- 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



More information about the Gcc-bugs mailing list