[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#121642: libstdc++3: Unable to do buffered cout (?)



> > In gcc 2.95, tieing stdout and cout was achieved by having the same
> > buffer objects. Since the ABI changed, and since the buffer is in
> > glibc, this isn't possilbe anymore.
> 
> 	So, is the final behaviour (aka: non-buffered output) the standard
> behaviour? My guess is not ... if so, is there a way to fix it?

The current behaviour complies with the C++ standard, if that is what
you are asking. That is because the standard doesn't mandate anything
about buffering cout, except for saying that certain operations shall
flush it (e.g. writing endl).

There is certainly a way to fix it. The problem is that every solution
that has been considered so far would
- require changes to glibc
- thus fail to work on older versions of glibc
- may break support for older C++ compiler in glibc
- break the iostreams ABI of g++ 3.0.

To my knowledge, nothing has been done beyond considering solutions so
far, but you may ask on the libstdc++ list for their analysis of the
current state of affairs.

The bug was reported as libstdc++/3269 in the GCC GNATS.

Regards,
Martin



Reply to: