This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: libstdc++/4150: catastrophic performance decrease in C++ code
> No, it turns out to be the equal but opposite bug; with my patch, if
> you do a sputc followed by an sungetc, _M_out_cur is unchanged, and no
> write is done. So if you always write from _M_out_beg to _M_out_end,
> you get spurious writes, and if you don't, you lose writes. Both
> because read operations have confused things.
After looking at this last night, I have to agree. Your patch as it
stands breaks expected behavior.
-benjamin