This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v3 1/2] float128: Add strtof128, wcstof128, and related functions.


On Wed, 7 Jun 2017, Gabriel F. T. Gomes wrote:

> From: "Paul E. Murphy" <murphyp@linux.vnet.ibm.com>
> 
> Changes since v2:
> 
>   - Fixed the condition for defining F128 (no dependency on compiler version).
>   - Fixed the condition for defining CHAR (no dependency on __HAVE_FLOAT128).

I still don't see why this patch should be defining CHAR at all.  
tst-strtod.h makes no use of the macro CHAR.  In cases where there is a 
test skeleton (.c file) that uses CHAR, and is itself used for both wide 
and narrow strings, I'd expect each of the wide-string and narrow-string 
tests using that skeleton to define CHAR themselves.  And that should have 
nothing to do with float128.

> +/* Test strfromf128 and strtof128 on all platforms that provide them,
> +   whether or not the type _Float128 is ABI-distinct from long double.  */
> +#if __HAVE_FLOAT128
> +# define _GEN_f128(mfunc,...) mfunc (__VA_ARGS__)
> +# define _DO_f128(mfunc,...) (mfunc ## f128) (__VA_ARGS__)
> +#else
> +# define _GEN_f128(...)
> +# define _DO_f128(...) 0
> +#endif

That's still more macros than I'd expect.  You should only need one macro, 
not two, if the macro is put around a call to mfunc in the GEN case and 
around a (result |= mfunc ## f128 (__VA_ARGS);) statement in the 
STRTOD_TEST_FOREACH case.

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]