This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [v3] libstdc++/38678
Paolo Carlini wrote:
> I just read carefully the discussion of 165 and I found it interesting:
> Dietmar read 27.6.2.1/2 as requirements about *indirect* calls (e.g.,
> sputn calling the xsputn virtual), thus not as something which has
> immediate implications for public vs protected and friendship and so on.
> Thus, I wonder if implementing the resolution of DR 165 implies already
> that ostream::write is allowed to call sputn (and therefore any
> overridden xsputn). Note that by default xsputn *is* explicitly
> equivalent to a series of sputc, thus I don't see major inconsistencies.
> See also where Dietmar discusses rdbuf->pubsync() vs the sync virtual...
>
In other terms, my current reading of the discussion / resolution of DR
165 [CD1] implies that the recent changes to the ostream od libstdc++-v3
should be reverted, ie, ostream::write can call streambuf::sputn.
Moreover, since there is agreement about the istream counterpart, that
would imply that the istream changes should be reverted too, ie,
istream::read/readsome can call streambuf::sgetn. Then, to avoid back
and forth in the behavior we are implementing, I would think all the
recent changes should be reverted and libstdc++/38678 suspended.
Paolo.