This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/21982] GCC should combine adjacent stdio calls
- From: "ghazi at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 10 Jun 2005 12:42:12 -0000
- Subject: [Bug tree-optimization/21982] GCC should combine adjacent stdio calls
- References: <20050609125653.21982.ghazi@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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