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 8/8] float128: Add wrappers to override ldbl-128 as float128.


On Wed, 9 Nov 2016, Gabriel F. T. Gomes wrote:

> +/* float.h constants.  */
> +#include <float.h>
> +#undef HUGE_VALL

HUGE_VALL is not a float.h constant.

> +/* __nanl is actually a macro.  */
> +#undef __nanl
> +#define __nanl(str) __nanf128(str)

Not since

2016-09-20  Paul E. Murphy  <murphyp@linux.vnet.ibm.com>

        * math/s_nanf.c: Remove __nanf undef.
        * math/s_nan.c: Remove __nan undef.
        * math/s_nanl.c: Remove __nanl undef.

        * sysdeps/generic/math_private.h (__nan): Remove macro
        override.
        (__nanf): Likewise.
        (__nanl): Likewise.

it isn't.

> +/* assume GCC >= 6.2 and use the type-generic builtin.  */
> +#define __builtin_copysignl __builtin_copysign
> +#define __builtin_signbitl __builtin_signbit

__builtin_copysign is not and never has been type-generic (type-generic 
built-in functions don't support the return type depending on the argument 
type, so it couldn't possibly work as type-generic).  You'll need to use 
__builtin_copysignf128 and map to __builtin_copysignq for older compilers 
(and for consistency I'd say use __builtin_signbitf128 similarly).

-- 
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]