This is the mail archive of the
mailing list for the libstdc++ project.
Re: [PATCH] streambuf_iterator: avoid debug-dependent behaviour
- From: Petr Ovtchenkov <ptr at void-ptr dot info>
- To: Jonathan Wakely <jwakely at redhat dot com>
- Cc: libstdc++ at gcc dot gnu dot org
- Date: Mon, 25 Sep 2017 12:34:02 +0300
- Subject: Re: [PATCH] streambuf_iterator: avoid debug-dependent behaviour
- Authentication-results: sourceware.org; auth=none
- References: <E1dkqHr-0008T4-Qa@void-ptr.info> <20170901091037.GW4582@redhat.com> <firstname.lastname@example.org>
On Thu, 21 Sep 2017 21:23:13 +0300
Petr Ovtchenkov <email@example.com> wrote:
> On Fri, 1 Sep 2017 10:10:37 +0100
> Jonathan Wakely <firstname.lastname@example.org> wrote:
> > On 24/08/17 12:57 +0300, Petr Ovtchenkov wrote:
> > >Explicit do sgetc from associated streambuf. Avoid debug-dependent
> > >sgetc (within _M_at_eof()):
> > >
> > > __glibcxx_requires_cond(!_M_at_eof(),
> > > _M_message(__gnu_debug::__msg_inc_istreambuf)
> > > ._M_iterator(*this));
> > >
> > >Increment operators not require not-eof precoditions.
> > >
> > >Don't unlink associated streambuf if eof detected (in _M_get).
> > >
> > >Clean logic in postfix increment operator.
> > I find it very hard to understand the reasons for this patch. What
> > you've written above is too terse for me.
> > Are you fixing a bug? If so, do you have a testcase that demonstrates
> > the problem, and is fixed by these changes?
> Yes, I think I see a bug and I have testcase (at least I think
> that I have it). Looks, that François see this issue too
> and suggest patch. But I'm not satisfied with it.
> My previous suggestion has side effect, that is not acceptable.
> I'm trying to find better solution.