This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [v3] Fix second half of libstdc++/6745


On Tuesday, November 19 2002, "Paolo Carlini" wrote to "Gabriel Dos Reis, Jonathan Lennox, libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org, bkoz" saying:

> Gabriel Dos Reis wrote:
> >I'm a little bit worried about the fragility of __copy_streambufs().
>
> Me too :-(
> OTOH, it seems to me that we should find a workable way to improve the 
> performance for the testcases proposed by Jonathan involving user-defined 
> streambuf classes.

A potentially much simpler solution occured to me.  Could we declare that
Paolo's original patch (the one that started this thread) only applies to
cin?  I.e., make the condition this:
    if (__sbin == cin->rdbuf() && isatty(0))

Would this work?  I'm not sure of all the potential details of reopening cin
-- is it possible for it to get disassociated from fd 0?

-- 
Jonathan Lennox
lennox at cs dot columbia dot edu


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]