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] basic_filebuf: 45628 + non-modal I/O


Hi,

in general the patch looks great.
> Per request, here is a combined patch making std::filebuf::seekoff not required between reads and writes (or vice versa), and also not to flush if it is called (the exception being when writing with active conversion).
>
> Testcases included. Paolo, I lost track of your note to duplicate 4.cc and I modified it instead… is that OK?
No problem, in this case.
>  Also, I extended the 45628.cc submitted to the PR into two separate cases, for direct and codecvt buffering, each covering read and write states.
>   
Excellent.
> That turned up a bug in std::codecvt<__gnu_test::pod_uchar>, so I fixed it.
>
> Finally, I deleted two testcases which do nothing except check that reading and writing can't be mixed without seekoff. Note that both remaining testcases for sync are questionable. In 9182-1.cc, sync is not specified to throw so the verified behavior is surprising and likely noncompliant. In 1057.cc, xsputn only calls overflow due to a series of coincidences, so the test is not truly passed.
>   
About 9182-1, what I *do* remember is that we noticed with Petur (and
Nathan) a number of circumstances where really we couldn't provide reach
enough diagnostics to the user by way simply of return values from the
concerned functions. In general I think this is recognized as a real
issue in the current design of C++ iostreams. While I apply locally your
patch and tweak the linker map, most likely reporting back that I'm
going to commit your patch, you are welcome to start looking into the
issue in more detail and suggest possible changes...

Thanks,
Paolo.


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