]> git.ipfire.org Git - thirdparty/glibc.git/commit
math: Properly cast X_TLOSS to float [BZ #28713]
authorH.J. Lu <hjl.tools@gmail.com>
Mon, 20 Dec 2021 23:00:24 +0000 (15:00 -0800)
committerFlorian Weimer <fweimer@redhat.com>
Wed, 11 Jan 2023 14:13:10 +0000 (15:13 +0100)
commit80b24b86548eee3d96130a48e760d1d6c2e0c587
treebb3f7c0a50bb5ab9ddaa4e7524604d5eeac34b6c
parentdd0c72fb461a8879164588cd870702efae0c7237
math: Properly cast X_TLOSS to float [BZ #28713]

Add

 #define AS_FLOAT_CONSTANT_1(x) x##f
 #define AS_FLOAT_CONSTANT(x) AS_FLOAT_CONSTANT_1(x)

to cast X_TLOSS to float at compile-time to fix:

FAIL: math/test-float-j0
FAIL: math/test-float-jn
FAIL: math/test-float-y0
FAIL: math/test-float-y1
FAIL: math/test-float-yn
FAIL: math/test-float32-j0
FAIL: math/test-float32-jn
FAIL: math/test-float32-y0
FAIL: math/test-float32-y1
FAIL: math/test-float32-yn

when compiling with GCC 12.

Reviewed-by: Paul Zimmermann <Paul.Zimmermann@inria.fr>
(cherry picked from commit 6e30181b4a3ab6c56da0378b65f4d60504982300)
math/math-svid-compat.h
math/w_j0f_compat.c
math/w_j1f_compat.c
math/w_jnf_compat.c