[Patch, libgfortran] PR 25561 Part 1.1/2 Minor improvements to part 1

Janne Blomqvist blomqvist.janne@gmail.com
Thu May 15 19:02:00 GMT 2008


Hello,

the attached patch does some minor improvements on top of part 1 of the
patch ( http://gcc.gnu.org/ml/gcc-patches/2008-05/msg00769.html ) which
was committed earlier today. As the patch already was quite big, I
didn't want to make reviewers trawl through it again just due to these
minor changes.

It changes the fbuf structure such that the current position in the
structure is an offset from the beginning rather than a pointer. This
makes the buffer manipulation functions a bit simpler.

The main change is that in fbuf_alloc, it avoids keeping already flushed
bytes in case the request doesn't fit into the current buffer. This
avoids the buffer growing without bound if the user is executing many
advance='no' write statements (e.g. in a loop).

It also implements Thomas Koenigs suggestion to use the provided RECL
(if available) as the initial buffer size. Thanks, Thomas!

Regtested on i686-pc-linux-gnu, Ok for trunk?

--
Janne Blomqvist
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ChangeLog-part1.1
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20080515/abc822f6/attachment.ksh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr25561-part1.1-1.diff
Type: text/x-patch
Size: 5318 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20080515/abc822f6/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20080515/abc822f6/attachment.sig>


More information about the Fortran mailing list