This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Avoid using static buffers in {gfc_,}[ixob]toa
- From: Steven Bosscher <stevenb at suse dot de>
- To: fortran at gcc dot gnu dot org, Jakub Jelinek <jakub at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sat, 1 Oct 2005 12:37:16 +0200
- Subject: Re: [PATCH] Avoid using static buffers in {gfc_,}[ixob]toa
- References: <20051001101912.GB8983@devserv.devel.redhat.com>
On Saturday 01 October 2005 12:19, Jakub Jelinek wrote:
> 2005-10-01 Jakub Jelinek <jakub@redhat.com>
>
> * libgfortran.h (GFC_ITOA_BUF_SIZE, GFC_XTOA_BUF_SIZE,
> GFC_OTOA_BUF_SIZE, GFC_BTOA_BUF_SIZE): Define.
> (gfc_itoa, xtoa): Add 2 extra arguments.
> * runtime/environ.c: Include stdio.h.
> (check_buffered): Use sprintf.
> * runtime/error.c: Include assert.h.
> (gfc_itoa, xtoa): Add 2 extra arguments, avoid using static
> buffers.
> (st_printf, st_sprintf): Adjust callers.
> * io/write.c (otoa, btoa): Add 2 extra arguments, avoid using
> static buffers.
> (write_int, write_decimal): Add 2 extra arguments to conv
> function pointer, adjust caller.
> (write_integer): Adjust gfc_itoa caller.
>
> * io/unit.c (get_array_unit_len): Return 0 rather than NULL.
>
> * io/read.c (read_f): Remove spurious pointer dereference.
This is OK.
Gr.
Steven