[PATCH] math: Fix float conversion regressions with gcc-12 [BZ #28713]

Szabolcs Nagy szabolcs.nagy@arm.com
Sun Jan 2 13:27:55 GMT 2022


The 01/01/2022 07:45, Paul Zimmermann wrote:
>        Dear Szabolcs,
> 
> +# define M_PI_2f	1.57079632679489661923f	/* pi/2 */
> 
> -      __real__ res = (FLOAT) M_MLIT (M_PI_2) - __real__ y;
> +      __real__ res = M_MLIT (M_PI_2) - __real__ y;
> 
> I wonder why your patch never uses M_PI_2f. Should it be M_PI_2f above?

this is template code under math/ and M_MLIT (M_PI_2) should
expand to M_PI_2f when it is used for the float variant.

see the change in
sysdeps/generic/math-type-macros-float.h


More information about the Libc-alpha mailing list