This is the mail archive of the
mailing list for the GCC project.
Re: [libfortran] Patch for pr 15328
- From: Paul Brook <paul at codesourcery dot com>
- To: fortran at gcc dot gnu dot org
- Cc: Janne Blomqvist <jblomqvi at cc dot hut dot fi>, gcc-patches at gcc dot gnu dot org
- Date: Sun, 16 May 2004 14:28:33 +0100
- Subject: Re: [libfortran] Patch for pr 15328
- Organization: CodeSourcery
- References: <20040514193449.GA412@vipunen.hut.fi>
On Friday 14 May 2004 20:34, Janne Blomqvist wrote:
> Patch for pr 15328:
2004-05-16 Janne Blomqvist <firstname.lastname@example.org>
* io/io.h (flush): Add prototype.
* io/transfer.c (finalize_transfer): Flush partial records.
* io/unix.c (flush): New function.
I can't find anything in the standard that says the data must be written to
the device before execution continues. It also specifies that a file may not
be connected to more than one unit. My interpretation is that this is to
allow the processor freedom to cache/defer writes to improve performance.
Ideally I'd like to always flush when we think it might be useful (eg. when
connected to a terminal), but not when connected to a file. Calling flush
after every write is likely to kill performance.
Even with your patch we still assume the OS does something sensible when
ADVANCE=yes. However it's better than what we currently have.
Also a few points about submitting patches:
- Please include a ChangeLog entry (as plain text in the body of the email).
- We will need a copyright assignment (I know I'm repeating myself, but it's
- You might find it easier to use "cvs diff -u" (or -c) to generate your
patch. Either that or "diff -ru" against a clean tree.
- The ususal issues with tabs vs spaces. GCC convention is to use hard tabs
width 8. Care needs to be taken to preserve these when pasting a patch into
an email, otherwise it won't apply cleanly..