This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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: [Patch] Remove basic_filebuf::_M_last_overflowed


Benjamin Kosnik wrote:

In std_fstream.h we had this comment

  // XXX Needed?
  bool            _M_last_overflowed;

so I had a look. The only place where it was used
was seekeoff():


Hmm. Did you see the unfinished parts of filebuf::close? That's why this
data member exists. See 27.8.1.3 - Member functions p6 and tell me if
you think it can be done without this.

Ok, will do...

And the only place where it was *apparently* set to true
was _M_overflow().

However, overflow(), just before returning, set it back
to false!


This is a bug and should be fixed. Just move

_M_last_overflowed = false; // Set in _M_overflow, below.

to a point ahead of the _M_overflow call.

... same!

Thanks!
Paolo.


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