Anton Pevtsov wrote:
[...]
Martin, another question to your changes. There are the following code
(_ioinsert.cc, line 180):

            else {
                __err = _STD::ios_base::badbit;

#ifndef _RWSTD_NO_EXT_KEEP_WIDTH_ON_FAILURE
                __strm.width (0);   // reset width only on success
#endif   // _RWSTD_NO_EXT_KEEP_WIDTH_ON_FAILURE
            }

But it looks like here should be something like this:

            else {
                __err = _STD::ios_base::badbit;

#ifdef _RWSTD_NO_EXT_KEEP_WIDTH_ON_FAILURE
                __strm.width (0);   // reset width unconditionally
#endif   // _RWSTD_NO_EXT_KEEP_WIDTH_ON_FAILURE
            }

If I have not missed something...

I think you are right. Strangely width_test doesn't catch it.
[Investigating...] Okay, I see why the test doesn't catch it:
because that code path doesn't even get exercised.

Thanks for pointing it out! I think I might go ahead and commit
these changes sometime over the weekend.

Martin

Reply via email to