This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 5/5] Refactor tst-strtod-round.c for type-generic-ness
- From: Joseph Myers <joseph at codesourcery dot com>
- To: "Paul E. Murphy" <murphyp at linux dot vnet dot ibm dot com>
- Cc: <libc-alpha at sourceware dot org>
- Date: Tue, 17 May 2016 21:39:10 +0000
- Subject: Re: [PATCH 5/5] Refactor tst-strtod-round.c for type-generic-ness
- Authentication-results: sourceware.org; auth=none
- References: <cover dot 1463433826 dot git dot murphyp at linux dot vnet dot ibm dot com> <cca40ebcfcae4e0b99ee3fc01a964d09055cac43 dot 1463433828 dot git dot murphyp at linux dot vnet dot ibm dot com>
On Mon, 16 May 2016, Paul E. Murphy wrote:
> + FTYPE f = strto ## FSUF (s, NULL); \
> + if (f != expected-> FSUF \
> + || (copysign ## CSUF)(1.0 ## LSUF, f) \
> + != (copysign ## CSUF)(1.0 ## LSUF, expected-> FSUF)) \
Missing space between ')' and '(' in function call. Spurious space after
"->".
> + FTOSTR(efstr, FSTRLENMAX, "%" FTOSTRM "a", expected-> FSUF); \
> + FTOSTR(fstr, FSTRLENMAX, "%" FTOSTRM "a", f); \
More missing and spurious spaces
> + printf ("strto" #FSUF "(%s) returned %s not %s" \
> + "(%s)\n", s, fstr, efstr, mode_name); \
> + if ((round_ok & RND_OK ## FSUF) != 0 || exact-> FSUF) \
Another spurious space, and should only have one space before "||".
> + ((ROUNDING_TESTS(float, m) ? RND_OKf : 0) | \
> + (ROUNDING_TESTS(double, m) ? RND_OKd : 0) | \
> + (ROUNDING_TESTS(long double, m) ? _RND_OKld : 0 ))
Missing spaces in macro calls. Operators go at the start of the line, not
at the end of the line.
> +/* Declare a member element for each floating point type
> + with a suffix matching FSUF above. */
> +#define STRUCT_FOREACH_TYPE(n) \
> + float n ## f; \
> + double n ## d; \
> + long double n ## ld; \
The last line of a macro definition should not have a backslash-newline
that effectively continues it onto the following blank line.
> +struct test_exactness
> + {
> + STRUCT_FOREACH_TYPE( )
> + };
> +
> +struct test_results
> + {
> + STRUCT_FOREACH_TYPE( )
Missing space before '(', spurious space inside parentheses.
Please send an updated patch series with fixes for the various issues
noted.
--
Joseph S. Myers
joseph@codesourcery.com