------- Comment #1 from jakub at gcc dot gnu dot org 2009-03-17 09:45 ------- Just learn C. strlen return type is size_t, unsigned type, so in the third case you have (assuming size_t is say unsigned long) i <= 0UL - 1, unsigned long comparison, which is evaluated as (unsigned long) i <= -1UL, so it loops forever.
-- jakub at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |INVALID http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39479