------- Comment #2 from paolo dot carlini at oracle dot com 2010-09-20 12:15 ------- I was having a second look to this issue, and noticed something more which I missed the first time: the Standard, *only* in the case of getline(char_type*, streamsize, char_type) explicitly says "These conditions are tested in the order shown.". In my opinion that means that the get and ignore overloads using the famous "any of the following occurs" can in principle check the conditions in *any* implementation defined order and being conforming. Now, we have a case here where we have an additional underflow because in our implementation we uniformly insist on always checking whether end-of-file occurs in the sequence, thus setting eofbit (besides the special case of ignore(), as already noticed) in that case, like the above mentioned getline does, for example. I want to understand how critical this additional underflow is, performance-wise, which, as far as I can see normally can be triggered only by passing in_avail to ignore, because otherwise, frankly, I find our consistent implementation defined behavior across the various get, getline, ignore overloads pretty nice.
-- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42857