This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] PR fortran/88227 -- Revenge of the BOZ
- From: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- To: Bernhard Reutner-Fischer <rep dot dot dot nop at gmail dot com>
- Cc: fortran at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Tue, 6 Aug 2019 07:56:46 -0700
- Subject: Re: [PATCH] PR fortran/88227 -- Revenge of the BOZ
- References: <20190728234102.GA73232@troutmask.apl.washington.edu> <email@example.com>
- Reply-to: sgk at troutmask dot apl dot washington dot edu
On Tue, Aug 06, 2019 at 04:27:46PM +0200, Bernhard Reutner-Fischer wrote:
> Hi Steve,
> I know you already committed this but please let me add a remark or two.
> On Sun, 28 Jul 2019 16:41:02 -0700
> Steve Kargl <firstname.lastname@example.org> wrote:
> > +
> > + bufp = buf = XCNEWVEC (char, j + 1);
> > + memset (bufp, 0, j + 1);
> Just cosmetics since it should be optimized away, but the memset is
> redundant, XCNEWVEC aka xcalloc already clears the memory resp.
> allocates cleared memory.
I wasn't sure if XCNEWVEC zeroed memory. The patch builds
the binary string with pointer arithmetic, and was trying
to prevent bad things from happening if I got that wrong
(which I did once or twice :).
I'll clean this up later.