------- Comment #15 from tsyvarev at ispras dot ru 2008-11-01 18:43 ------- I belived that the easier describe situation is the better. Because setting flag is simpler to observe, than the fact of comparision (in == end), PR was reported about flag but comparision.
But the second patch is also not correct... If run test in the second attachment, in the second testcase(falsename - "false", "truename" - true, input - "false") eofbit flag won't be set(it is right). But in the third testcase(input is "true") implementation set eofbit flag. Problem is that __lim cannot be used as stopper for the cycle, because target sequences have different lenght. If move last if in for-cycle if ((!__testt && __n >= __lc->_M_falsename_size) || (!__testf && __n >= __lc->_M_truename_size)) break; to the beginning of the cycle, all seems to be correct... except case of identical target sequences. Later I'll try to write more presize test, and may try to write patch. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37958