This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 01/14] Prepare vfprintf to use __printf_fp/__printf_fphex with float128 arg
- From: Florian Weimer <fweimer at redhat dot com>
- To: "Gabriel F. T. Gomes" <gabriel at inconstante dot eti dot br>
- Cc: Joseph Myers <joseph at codesourcery dot com>, <libc-alpha at sourceware dot org>
- Date: Tue, 18 Dec 2018 12:17:41 +0100
- Subject: Re: [PATCH 01/14] Prepare vfprintf to use __printf_fp/__printf_fphex with float128 arg
- References: <20180621021023.17036-1-gabriel@inconstante.eti.br> <20180621021023.17036-2-gabriel@inconstante.eti.br> <alpine.DEB.2.20.1806212119520.19363@digraph.polyomino.org.uk> <20181207181557.067ca7e3@tereshkova>
* Gabriel F. T. Gomes:
> + } while (0)
Style issue: while should be on a separate line (occurs multiple times).
> @@ -1887,7 +1930,12 @@ printf_positional (FILE *s, const CHAR_T *format, int readonly_format,
> (args_value[cnt].pa_user, ap_savep);
> }
> else
> - args_value[cnt].pa_long_double = 0.0;
> + {
> + args_value[cnt].pa_long_double = 0.0;
> +#if __HAVE_FLOAT128_UNLIKE_LDBL
> + args_value[cnt].pa_float128 = 0;
> +#endif
> + }
This bit doesn't look right to me because args_value[cnt] is a union.
You need to assign to the right member, or perhaps zero-initialize using
memset.
Thanks,
Florian