This is the mail archive of the 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: libstdc++/9439: filebuf::sputbackc ignores beginning-of-file

Synopsis: filebuf::sputbackc ignores beginning-of-file

Responsible-Changed-From-To: unassigned->paolo
Responsible-Changed-By: paolo
Responsible-Changed-When: Sun Feb  2 17:38:23 2003
    Analyzed a bit.
State-Changed-From-To: open->feedback
State-Changed-By: paolo
State-Changed-When: Sun Feb  2 17:38:23 2003
    Hi. I don't think there is a bug here: I cannot find in the
    standard a specific prescription for the behaviour you
    expect (in particular in Can you?
    Indeed, sputbackc calls, as expected, pbackfail, which in turns calls seekoff (fstream.tcc, line 218) (pay attention
    to the preceding comment which means that this specific situation was considered and _not_ supposed to lead to an
    obvious failure). The latter call then does _not_ fail and
    a put back buffer is created by _M_pback_create(), hosting
    the put back char, _exactly as happens_ when __testpb &&
    !__testeof && !__testeq, above. 
    I agree that a few widespread implementations behave
    differently in this case, but we are, I maintain, in the
    realm of implementation defined behaviour.

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