Skip to content

Commit fedbb0f

Browse files
authored
[libc] Capture 'POLY_COEFFS' by reference in asinpi_polyeval lambda. (llvm#164404)
Closes llvm#164403 GCC fails to compile libc currently. This PR fixes this by capturing 'POLY_COEFFS' by reference.
1 parent 1e99026 commit fedbb0f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libc/src/math/generic/asinpif16.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ LLVM_LIBC_FUNCTION(float16, asinpif16, (float16 x)) {
7777
};
7878
// polynomial evaluation using horner's method
7979
// work only for |x| in [0, 0.5]
80-
auto asinpi_polyeval = [](double x) -> double {
80+
auto asinpi_polyeval = [&](double x) -> double {
8181
return x * fputil::polyeval(x * x, POLY_COEFFS[0], POLY_COEFFS[1],
8282
POLY_COEFFS[2], POLY_COEFFS[3], POLY_COEFFS[4],
8383
POLY_COEFFS[5], POLY_COEFFS[6], POLY_COEFFS[7]);

0 commit comments

Comments
 (0)