Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Mar 2021 13:06:22 GMT
From:      Alex Richardson <arichardson@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 7f5693d05329 - main - Fix unused functions in invtrig_test.c
Message-ID:  <202103221306.12MD6MAt044155@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by arichardson:

URL: https://cgit.FreeBSD.org/src/commit/?id=7f5693d05329ab976287b8d449e694e7a0f99e88

commit 7f5693d05329ab976287b8d449e694e7a0f99e88
Author:     Alex Richardson <arichardson@FreeBSD.org>
AuthorDate: 2021-03-22 13:05:28 +0000
Commit:     Alex Richardson <arichardson@FreeBSD.org>
CommitDate: 2021-03-22 13:06:02 +0000

    Fix unused functions in invtrig_test.c
    
    I only tested the WARNS=6 change on AArch64 and AMD64, but this file has
    unused functions for architectures with LDBL_PREC == 53.
    
    While touching this file change the LDBL_PREC == 53 checks to i386 checks.
    The long double tests should only be disabled for i386 (due to the rather
    odd rounding mode that it uses) not all architectures where long double
    is the same as double.
    
    PR:             205449
    Fixes:          87d65c747a43 ("lib/msun: Allow building tests with WARNS=6")
    Reported by:    Jenkins
---
 lib/msun/tests/invtrig_test.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/lib/msun/tests/invtrig_test.c b/lib/msun/tests/invtrig_test.c
index 7dd8b26f652f..90ebcc5dfdad 100644
--- a/lib/msun/tests/invtrig_test.c
+++ b/lib/msun/tests/invtrig_test.c
@@ -68,7 +68,7 @@ __FBSDID("$FreeBSD$");
 		 (tol) * ldexpf(1.0, 1 - FLT_MANT_DIG), (excepts));	\
 } while (0)
 
-#if LDBL_PREC == 53
+#ifdef __i386__
 #define	testall_tol	_testall_tol
 #else
 #define	testall_tol(prefix, x, result, tol, excepts) do {		\
@@ -98,7 +98,7 @@ __FBSDID("$FreeBSD$");
 		  (tol) * ldexpf(1.0, 1 - FLT_MANT_DIG), (excepts));	\
 } while (0)
 
-#if LDBL_PREC == 53
+#ifdef __i386__
 #define	testall2_tol	_testall2_tol
 #else
 #define	testall2_tol(prefix, y, x, result, tol, excepts) do {		\
@@ -380,12 +380,14 @@ sinasin(double x)
 	return (sinl(asin(x)));
 }
 
+#ifndef __i386__
 static long double
 sinasinl(long double x)
 {
 
 	return (sinl(asinl(x)));
 }
+#endif
 
 static long double
 cosacosf(float x)
@@ -401,12 +403,14 @@ cosacos(double x)
 	return (cosl(acos(x)));
 }
 
+#ifndef __i386__
 static long double
 cosacosl(long double x)
 {
 
 	return (cosl(acosl(x)));
 }
+#endif
 
 static long double
 tanatanf(float x)
@@ -422,12 +426,14 @@ tanatan(double x)
 	return (tanl(atan(x)));
 }
 
+#ifndef __i386__
 static long double
 tanatanl(long double x)
 {
 
 	return (tanl(atanl(x)));
 }
+#endif
 
 ATF_TC_WITHOUT_HEAD(inverse);
 ATF_TC_BODY(inverse, tc)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202103221306.12MD6MAt044155>