git: fa1e8538d1ce - main - math.h: Remove support for old gcc versions
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 21 Jun 2024 02:41:25 UTC
The branch main has been updated by imp:
URL: https://cgit.FreeBSD.org/src/commit/?id=fa1e8538d1cec1d741a5071ad0376aea05ae6ddc
commit fa1e8538d1cec1d741a5071ad0376aea05ae6ddc
Author: Warner Losh <imp@FreeBSD.org>
AuthorDate: 2024-06-20 23:03:05 +0000
Commit: Warner Losh <imp@FreeBSD.org>
CommitDate: 2024-06-21 02:41:09 +0000
math.h: Remove support for old gcc versions
Remove support for old gcc versions by unconditionally defining
__MATH_BUILTIN_RELOPS and __MATH_BUILTIN_CONSTANTS. Per kib's request,
don't #undef those so it's easier to understand what the builtins are
doing.
Reviewed by: brooks
Differential Revision: https://reviews.freebsd.org/D45655
Sponsored by: Netflix
---
lib/msun/src/math.h | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/lib/msun/src/math.h b/lib/msun/src/math.h
index 0abf4b605fb8..be7b86144738 100644
--- a/lib/msun/src/math.h
+++ b/lib/msun/src/math.h
@@ -31,13 +31,8 @@ extern const union __nan_un {
float __uf;
} __nan;
-#if __GNUC_PREREQ__(3, 3)
#define __MATH_BUILTIN_CONSTANTS
-#endif
-
-#if __GNUC_PREREQ__(3, 0)
#define __MATH_BUILTIN_RELOPS
-#endif
#ifdef __MATH_BUILTIN_CONSTANTS
#define HUGE_VAL __builtin_huge_val()
@@ -79,7 +74,7 @@ extern const union __nan_un {
float: f, \
double: d, \
long double: ld)(x)
-#elif __GNUC_PREREQ__(3, 1) && !defined(__cplusplus)
+#elif !defined(__cplusplus)
#define __fp_type_select(x, f, d, ld) __builtin_choose_expr( \
__builtin_types_compatible_p(__typeof(x), long double), ld(x), \
__builtin_choose_expr( \