This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 3/6] float128: Add strfromf128
- From: Joseph Myers <joseph at codesourcery dot com>
- To: "Gabriel F. T. Gomes" <gftg at linux dot vnet dot ibm dot com>
- Cc: <libc-alpha at sourceware dot org>
- Date: Fri, 2 Jun 2017 16:31:02 +0000
- Subject: Re: [PATCH 3/6] float128: Add strfromf128
- Authentication-results: sourceware.org; auth=none
- References: <1495803396-14558-1-git-send-email-gftg@linux.vnet.ibm.com> <1495803396-14558-4-git-send-email-gftg@linux.vnet.ibm.com> <alpine.DEB.2.20.1705261542240.31473@digraph.polyomino.org.uk> <20170529233143.5b34c8b4@keller.br.ibm.com>
On Mon, 29 May 2017, Gabriel F. T. Gomes wrote:
> I attached a patch with this refactoring for double and long double. I'll
> update this block for float128 in the next version of this patch.
>
> Is the attached patch (with the refactoring) OK for master?
This refactoring patch is OK.
> > In other places you set is_binary128 even when !__HAVE_DISTINCT_FLOAT128.
> > It's not *used* when !__HAVE_DISTINCT_FLOAT128 - is there a deliberate
> > choice that in this place it shouldn't be set either?
>
> The reason why I chose to not set it here, is because the struct info is
> zero'd by a memset some lines above (the narrowness of the diff context
> hid it):
>
> /* Prepare the format specification for printf_fp. */
> memset (&info, '\0', sizeof (info));
>
> Would it be more clear to set it anyway?
Given the memset, it seems reasonable not to zero it again.
--
Joseph S. Myers
joseph@codesourcery.com