Skip to content

Commit d3a5589

Browse files
authored
[libc] Add maybe_unused for functions only used on slow path (llvm#98024)
Summary: When the fast math options are enabled these functions are uncalled, which makes it error.
1 parent c9ee6b1 commit d3a5589

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libc/src/math/generic/tan.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ LIBC_INLINE DoubleDouble tan_eval(const DoubleDouble &u) {
9595
}
9696

9797
// Accurate evaluation of tan for small u.
98-
Float128 tan_eval(const Float128 &u) {
98+
[[maybe_unused]] Float128 tan_eval(const Float128 &u) {
9999
Float128 u_sq = fputil::quick_mul(u, u);
100100

101101
// tan(x) ~ x + x^3/3 + x^5 * 2/15 + x^7 * 17/315 + x^9 * 62/2835 +
@@ -127,7 +127,7 @@ Float128 tan_eval(const Float128 &u) {
127127
// Calculation a / b = a * (1/b) for Float128.
128128
// Using the initial approximation of q ~ (1/b), then apply 2 Newton-Raphson
129129
// iterations, before multiplying by a.
130-
Float128 newton_raphson_div(const Float128 &a, Float128 b, double q) {
130+
[[maybe_unused]] Float128 newton_raphson_div(const Float128 &a, Float128 b, double q) {
131131
Float128 q0(q);
132132
constexpr Float128 TWO(2.0);
133133
b.sign = (b.sign == Sign::POS) ? Sign::NEG : Sign::POS;

0 commit comments

Comments
 (0)