------- Additional Comments From ghazi at gcc dot gnu dot org 2005-06-10 12:42 ------- (In reply to comment #25) > Subject: Re: GCC should combine adjacent stdio > calls > On Fri, 10 Jun 2005, ghazi at gcc dot gnu dot org wrote: > POSIX defines how streams and file descriptors for the same file can be > used together and for an unbuffered stream it appears to me that the > results from writing to it with stdio (within parts of the file that > already existed; not after its end) should be immediately available in the > mapped region.
If you're talking about *unbuffered* streams, then it shouldn't matter whether you do two printfs or one. The results of the "%d" should be written "as soon as possible" with _IONBF and readable to the "%.5s". I think we're into severe pathology here, I haven't seen anything which leads me to believe that the governing standards made specific guarantees with regards to the cases you're bringing up. If you can quote specific passages to back up your claim, then fine. But so far your cases haven't held up IMHO. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21982