[libc-commits] [libc] [libc][math][C23] add software float16 support (PR #184283)
via libc-commits
libc-commits at lists.llvm.org
Fri Aug 28 21:37:22 PDT 2026
github-actions[bot] wrote:
<!--PREMERGE ADVISOR COMMENT: Windows-->
# :window: Windows x64 Test Results
The build failed before running any tests. Click on a failure below to see the details.
<details>
<summary>[code=1] lib/Support/CMakeFiles/LLVMSupport.dir/APFloat.cpp.obj</summary>
```
FAILED: [code=1] lib/Support/CMakeFiles/LLVMSupport.dir/APFloat.cpp.obj
sccache C:\clang\clang-msvc\bin\clang-cl.exe /nologo -TP -DUNICODE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_GLIBCXX_ASSERTIONS -D_HAS_EXCEPTIONS=0 -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE -D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -IC:\_work\llvm-project\llvm-project\build\lib\Support -IC:\_work\llvm-project\llvm-project\llvm\lib\Support -IC:\_work\llvm-project\llvm-project\build\include -IC:\_work\llvm-project\llvm-project\llvm\include -IC:\_work\llvm-project\llvm-project\llvm\..\third-party\siphash\include -IC:\_work\llvm-project\llvm-project\llvm\..\libc /DWIN32 /D_WINDOWS /Zc:inline /Zc:__cplusplus /Oi /Brepro /bigobj /permissive- -Werror=unguarded-availability-new /W4 -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wno-pass-failed -Wmisleading-indentation -Wctad-maybe-unsupported /Gw /O2 /Ob2 -std:c++17 -MD -UNDEBUG /EHs-c- /GR- /showIncludes /Folib\Support\CMakeFiles\LLVMSupport.dir\APFloat.cpp.obj /Fdlib\Support\CMakeFiles\LLVMSupport.dir\LLVMSupport.pdb -c -- C:\_work\llvm-project\llvm-project\llvm\lib\Support\APFloat.cpp
In file included from C:\_work\llvm-project\llvm-project\llvm\lib\Support\APFloat.cpp:43:
In file included from C:\_work\llvm-project\llvm-project\llvm\..\libc\shared/math.h:16:
In file included from C:\_work\llvm-project\llvm-project\llvm\..\libc\shared\math/acosf.h:13:
In file included from C:\_work\llvm-project\llvm-project\llvm\..\libc\src/__support/math/acosf.h:15:
C:\_work\llvm-project\llvm-project\llvm\..\libc\src/__support/FPUtil/except_value_utils.h(163,1): error: incomplete result type 'float16' (aka '__llvm_libc_apfloat::fputil::Float16') in function definition
163 | round_result_slightly_down(float16 value_rn) {
| ^
C:\_work\llvm-project\llvm-project\llvm\..\libc\src/__support/macros/properties/types.h(74,8): note: forward declaration of '__llvm_libc_apfloat::fputil::Float16'
74 | struct Float16;
| ^
In file included from C:\_work\llvm-project\llvm-project\llvm\lib\Support\APFloat.cpp:43:
In file included from C:\_work\llvm-project\llvm-project\llvm\..\libc\shared/math.h:16:
In file included from C:\_work\llvm-project\llvm-project\llvm\..\libc\shared\math/acosf.h:13:
In file included from C:\_work\llvm-project\llvm-project\llvm\..\libc\src/__support/math/acosf.h:15:
C:\_work\llvm-project\llvm-project\llvm\..\libc\src/__support/FPUtil/except_value_utils.h(163,36): error: variable has incomplete type 'float16' (aka '__llvm_libc_apfloat::fputil::Float16')
163 | round_result_slightly_down(float16 value_rn) {
| ^
C:\_work\llvm-project\llvm-project\llvm\..\libc\src/__support/macros/properties/types.h(74,8): note: forward declaration of '__llvm_libc_apfloat::fputil::Float16'
74 | struct Float16;
| ^
In file included from C:\_work\llvm-project\llvm-project\llvm\lib\Support\APFloat.cpp:43:
In file included from C:\_work\llvm-project\llvm-project\llvm\..\libc\shared/math.h:14:
In file included from C:\_work\llvm-project\llvm-project\llvm\..\libc\shared\math/acos.h:13:
In file included from C:\_work\llvm-project\llvm-project\llvm\..\libc\src/__support/math/acos.h:12:
In file included from C:\_work\llvm-project\llvm-project\llvm\..\libc\src/__support/math\asin_utils.h:14:
In file included from C:\_work\llvm-project\llvm-project\llvm\..\libc\src/__support/FPUtil/dyadic_float.h:13:
C:\_work\llvm-project\llvm-project\llvm\..\libc\src/__support/FPUtil\FPBits.h(858,41): error: incomplete result type '__llvm_libc_apfloat::fputil::Float16' in function definition
858 | LIBC_INLINE LIBC_BIT_CAST_CONSTEXPR T get_val() const {
| ^
C:\_work\llvm-project\llvm-project\llvm\..\libc\src/__support/FPUtil/except_value_utils.h(172,42): note: in instantiation of member function '__llvm_libc_apfloat::fputil::FPBits<__llvm_libc_apfloat::fputil::Float16>::get_val' requested here
172 | tmp -= FPBits<float16>::min_normal().get_val();
| ^
C:\_work\llvm-project\llvm-project\llvm\..\libc\src/__support/macros/properties/types.h(74,8): note: forward declaration of '__llvm_libc_apfloat::fputil::Float16'
74 | struct Float16;
| ^
In file included from C:\_work\llvm-project\llvm-project\llvm\lib\Support\APFloat.cpp:43:
In file included from C:\_work\llvm-project\llvm-project\llvm\..\libc\shared/math.h:14:
In file included from C:\_work\llvm-project\llvm-project\llvm\..\libc\shared\math/acos.h:13:
In file included from C:\_work\llvm-project\llvm-project\llvm\..\libc\src/__support/math/acos.h:12:
In file included from C:\_work\llvm-project\llvm-project\llvm\..\libc\src/__support/math\asin_utils.h:14:
In file included from C:\_work\llvm-project\llvm-project\llvm\..\libc\src/__support/FPUtil/dyadic_float.h:13:
C:\_work\llvm-project\llvm-project\llvm\..\libc\src/__support/FPUtil\FPBits.h(859,12): error: no matching function for call to 'bit_cast'
859 | return cpp::bit_cast<T>(UP::bits);
| ^~~~~~~~~~~~~~~~
C:\_work\llvm-project\llvm-project\llvm\..\libc\src/__support/CPP/bit.h(53,1): note: candidate template ignored: substitution failure [with To = __llvm_libc_apfloat::fputil::Float16]: invalid application of 'sizeof' to an incomplete type '__llvm_libc_apfloat::fputil::Float16'
48 | (sizeof(To) == sizeof(From)) &&
| ~~~~~~
49 | cpp::is_trivially_constructible<To>::value &&
50 | cpp::is_trivially_copyable<To>::value &&
51 | cpp::is_trivially_copyable<From>::value,
52 | To>
53 | bit_cast(const From &from) {
| ^
In file included from C:\_work\llvm-project\llvm-project\llvm\lib\Support\APFloat.cpp:43:
In file included from C:\_work\llvm-project\llvm-project\llvm\..\libc\shared/math.h:16:
In file included from C:\_work\llvm-project\llvm-project\llvm\..\libc\shared\math/acosf.h:13:
In file included from C:\_work\llvm-project\llvm-project\llvm\..\libc\src/__support/math/acosf.h:15:
C:\_work\llvm-project\llvm-project\llvm\..\libc\src/__support/FPUtil/except_value_utils.h(172,42): error: calling 'get_val' with incomplete return type '__llvm_libc_apfloat::fputil::Float16'
172 | tmp -= FPBits<float16>::min_normal().get_val();
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
C:\_work\llvm-project\llvm-project\llvm\..\libc\src/__support/FPUtil\FPBits.h(858,41): note: 'get_val' declared here
858 | LIBC_INLINE LIBC_BIT_CAST_CONSTEXPR T get_val() const {
| ^
C:\_work\llvm-project\llvm-project\llvm\..\libc\src/__support/macros/properties/types.h(74,8): note: forward declaration of '__llvm_libc_apfloat::fputil::Float16'
74 | struct Float16;
| ^
In file included from C:\_work\llvm-project\llvm-project\llvm\lib\Support\APFloat.cpp:43:
In file included from C:\_work\llvm-project\llvm-project\llvm\..\libc\shared/math.h:16:
In file included from C:\_work\llvm-project\llvm-project\llvm\..\libc\shared\math/acosf.h:13:
In file included from C:\_work\llvm-project\llvm-project\llvm\..\libc\src/__support/math/acosf.h:15:
C:\_work\llvm-project\llvm-project\llvm\..\libc\src/__support/FPUtil/except_value_utils.h(172,9): error: invalid operands to binary expression ('volatile float' and '__llvm_libc_apfloat::fputil::Float16')
172 | tmp -= FPBits<float16>::min_normal().get_val();
| ~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from C:\_work\llvm-project\llvm-project\llvm\lib\Support\APFloat.cpp:43:
In file included from C:\_work\llvm-project\llvm-project\llvm\..\libc\shared/math.h:14:
In file included from C:\_work\llvm-project\llvm-project\llvm\..\libc\shared\math/acos.h:13:
In file included from C:\_work\llvm-project\llvm-project\llvm\..\libc\src/__support/math/acos.h:18:
In file included from C:\_work\llvm-project\llvm-project\llvm\..\libc\src/__support/FPUtil/sqrt.h:15:
In file included from C:\_work\llvm-project\llvm-project\llvm\..\libc\src/__support/FPUtil/generic/sqrt.h:16:
C:\_work\llvm-project\llvm-project\llvm\..\libc\src/__support/FPUtil/cast.h(28,1): error: incomplete result type 'cpp::enable_if_t<cpp::is_floating_point_v<__llvm_libc_apfloat::fputil::Float16> && cpp::is_floating_point_v<float>, __llvm_libc_apfloat::fputil::Float16>' (aka '__llvm_libc_apfloat::fputil::Float16') in function definition
28 | cast(InType x) {
| ^
C:\_work\llvm-project\llvm-project\llvm\..\libc\src/__support/FPUtil/except_value_utils.h(174,12): note: in instantiation of function template specialization '__llvm_libc_apfloat::fputil::cast<__llvm_libc_apfloat::fputil::Float16, float>' requested here
174 | return cast<float16>(tmp);
| ^
C:\_work\llvm-project\llvm-project\llvm\..\libc\src/__support/macros/properties/types.h(74,8): note: forward declaration of '__llvm_libc_apfloat::fputil::Float16'
74 | struct Float16;
| ^
In file included from C:\_work\llvm-project\llvm-project\llvm\lib\Support\APFloat.cpp:43:
In file included from C:\_work\llvm-project\llvm-project\llvm\..\libc\shared/math.h:14:
In file included from C:\_work\llvm-project\llvm-project\llvm\..\libc\shared\math/acos.h:13:
In file included from C:\_work\llvm-project\llvm-project\llvm\..\libc\src/__support/math/acos.h:12:
In file included from C:\_work\llvm-project\llvm-project\llvm\..\libc\src/__support/math\asin_utils.h:14:
C:\_work\llvm-project\llvm-project\llvm\..\libc\src/__support/FPUtil/dyadic_float.h(442,40): error: incomplete result type '__llvm_libc_apfloat::fputil::Float16' in function definition
442 | LIBC_INLINE LIBC_CONSTEXPR_DEFAULT T as() const {
| ^
C:\_work\llvm-project\llvm-project\llvm\..\libc\src/__support/FPUtil/cast.h(79,26): note: in instantiation of function template specialization '__llvm_libc_apfloat::fputil::DyadicFloat<32>::as<__llvm_libc_apfloat::fputil::Float16, true, void>' requested here
79 | return xd.template as<OutType, /*ShouldSignalExceptions=*/true>();
| ^
C:\_work\llvm-project\llvm-project\llvm\..\libc\src/__support/FPUtil/except_value_utils.h(174,12): note: in instantiation of function template specialization '__llvm_libc_apfloat::fputil::cast<__llvm_libc_apfloat::fputil::Float16, float>' requested here
174 | return cast<float16>(tmp);
| ^
C:\_work\llvm-project\llvm-project\llvm\..\libc\src/__support/macros/properties/types.h(74,8): note: forward declaration of '__llvm_libc_apfloat::fputil::Float16'
74 | struct Float16;
| ^
In file included from C:\_work\llvm-project\llvm-project\llvm\lib\Support\APFloat.cpp:43:
In file included from C:\_work\llvm-project\llvm-project\llvm\..\libc\shared/math.h:14:
In file included from C:\_work\llvm-project\llvm-project\llvm\..\libc\shared\math/acos.h:13:
In file included from C:\_work\llvm-project\llvm-project\llvm\..\libc\src/__support/math/acos.h:12:
In file included from C:\_work\llvm-project\llvm-project\llvm\..\libc\src/__support/math\asin_utils.h:14:
C:\_work\llvm-project\llvm-project\llvm\..\libc\src/__support/FPUtil/dyadic_float.h(193,3): error: incomplete result type 'cpp::enable_if_t<cpp::is_floating_point_v<__llvm_libc_apfloat::fputil::Float16> && (FPBits<__llvm_libc_apfloat::fputil::Float16>::FRACTION_LEN < 32ULL), __llvm_libc_apfloat::fputil::Float16>' (aka '__llvm_libc_apfloat::fputil::Float16') in function definition
193 | generic_as() const {
| ^
C:\_work\llvm-project\llvm-project\llvm\..\libc\src/__support/FPUtil/dyadic_float.h(452,14): note: in instantiation of function template specialization '__llvm_libc_apfloat::fputil::DyadicFloat<32>::generic_as<__llvm_libc_apfloat::fputil::Float16, true>' requested here
452 | return generic_as<T, ShouldSignalExceptions>();
| ^
C:\_work\llvm-project\llvm-project\llvm\..\libc\src/__support/FPUtil/cast.h(79,26): note: in instantiation of function template specialization '__llvm_libc_apfloat::fputil::DyadicFloat<32>::as<__llvm_libc_apfloat::fputil::Float16, true, void>' requested here
79 | return xd.template as<OutType, /*ShouldSignalExceptions=*/true>();
| ^
C:\_work\llvm-project\llvm-project\llvm\..\libc\src/__support/FPUtil/except_value_utils.h(174,12): note: in instantiation of function template specialization '__llvm_libc_apfloat::fputil::cast<__llvm_libc_apfloat::fputil::Float16, float>' requested here
174 | return cast<float16>(tmp);
| ^
C:\_work\llvm-project\llvm-project\llvm\..\libc\src/__support/macros/properties/types.h(74,8): note: forward declaration of '__llvm_libc_apfloat::fputil::Float16'
74 | struct Float16;
| ^
In file included from C:\_work\llvm-project\llvm-project\llvm\lib\Support\APFloat.cpp:43:
In file included from C:\_work\llvm-project\llvm-project\llvm\..\libc\shared/math.h:14:
In file included from C:\_work\llvm-project\llvm-project\llvm\..\libc\shared\math/acos.h:13:
In file included from C:\_work\llvm-project\llvm-project\llvm\..\libc\src/__support/math/acos.h:12:
In file included from C:\_work\llvm-project\llvm-project\llvm\..\libc\src/__support/math\asin_utils.h:14:
C:\_work\llvm-project\llvm-project\llvm\..\libc\src/__support/FPUtil/dyadic_float.h(452,14): error: calling 'generic_as<__llvm_libc_apfloat::fputil::Float16, true>' with incomplete return type 'cpp::enable_if_t<cpp::is_floating_point_v<__llvm_libc_apfloat::fputil::Float16> && (FPBits<__llvm_libc_apfloat::fputil::Float16>::FRACTION_LEN < 32ULL), __llvm_libc_apfloat::fputil::Float16>' (aka '__llvm_libc_apfloat::fputil::Float16')
452 | return generic_as<T, ShouldSignalExceptions>();
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\_work\llvm-project\llvm-project\llvm\..\libc\src/__support/FPUtil/cast.h(79,26): note: in instantiation of function template specialization '__llvm_libc_apfloat::fputil::DyadicFloat<32>::as<__llvm_libc_apfloat::fputil::Float16, true, void>' requested here
79 | return xd.template as<OutType, /*ShouldSignalExceptions=*/true>();
| ^
C:\_work\llvm-project\llvm-project\llvm\..\libc\src/__support/FPUtil/except_value_utils.h(174,12): note: in instantiation of function template specialization '__llvm_libc_apfloat::fputil::cast<__llvm_libc_apfloat::fputil::Float16, float>' requested here
174 | return cast<float16>(tmp);
| ^
C:\_work\llvm-project\llvm-project\llvm\..\libc\src/__support/FPUtil/dyadic_float.h(193,3): note: 'generic_as' declared here
193 | generic_as() const {
| ^
C:\_work\llvm-project\llvm-project\llvm\..\libc\src/__support/macros/properties/types.h(74,8): note: forward declaration of '__llvm_libc_apfloat::fputil::Float16'
74 | struct Float16;
| ^
In file included from C:\_work\llvm-project\llvm-project\llvm\lib\Support\APFloat.cpp:43:
In file included from C:\_work\llvm-project\llvm-project\llvm\..\libc\shared/math.h:14:
In file included from C:\_work\llvm-project\llvm-project\llvm\..\libc\shared\math/acos.h:13:
In file included from C:\_work\llvm-project\llvm-project\llvm\..\libc\src/__support/math/acos.h:12:
In file included from C:\_work\llvm-project\llvm-project\llvm\..\libc\src/__support/math\asin_utils.h:14:
C:\_work\llvm-project\llvm-project\llvm\..\libc\src/__support/FPUtil/dyadic_float.h(452,14): error: initialization of incomplete type '__llvm_libc_apfloat::fputil::Float16'
452 | return generic_as<T, ShouldSignalExceptions>();
| ^
C:\_work\llvm-project\llvm-project\llvm\..\libc\src/__support/macros/properties/types.h(74,8): note: forward declaration of '__llvm_libc_apfloat::fputil::Float16'
74 | struct Float16;
| ^
In file included from C:\_work\llvm-project\llvm-project\llvm\lib\Support\APFloat.cpp:43:
In file included from C:\_work\llvm-project\llvm-project\llvm\..\libc\shared/math.h:14:
In file included from C:\_work\llvm-project\llvm-project\llvm\..\libc\shared\math/acos.h:13:
In file included from C:\_work\llvm-project\llvm-project\llvm\..\libc\src/__support/math/acos.h:18:
In file included from C:\_work\llvm-project\llvm-project\llvm\..\libc\src/__support/FPUtil/sqrt.h:15:
In file included from C:\_work\llvm-project\llvm-project\llvm\..\libc\src/__support/FPUtil/generic/sqrt.h:16:
C:\_work\llvm-project\llvm-project\llvm\..\libc\src/__support/FPUtil/cast.h(79,26): error: calling 'as<__llvm_libc_apfloat::fputil::Float16, true, void>' with incomplete return type '__llvm_libc_apfloat::fputil::Float16'
79 | return xd.template as<OutType, /*ShouldSignalExceptions=*/true>();
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\_work\llvm-project\llvm-project\llvm\..\libc\src/__support/FPUtil/except_value_utils.h(174,12): note: in instantiation of function template specialization '__llvm_libc_apfloat::fputil::cast<__llvm_libc_apfloat::fputil::Float16, float>' requested here
174 | return cast<float16>(tmp);
| ^
C:\_work\llvm-project\llvm-project\llvm\..\libc\src/__support/FPUtil/dyadic_float.h(442,40): note: 'as' declared here
442 | LIBC_INLINE LIBC_CONSTEXPR_DEFAULT T as() const {
| ^
C:\_work\llvm-project\llvm-project\llvm\..\libc\src/__support/macros/properties/types.h(74,8): note: forward declaration of '__llvm_libc_apfloat::fputil::Float16'
74 | struct Float16;
| ^
In file included from C:\_work\llvm-project\llvm-project\llvm\lib\Support\APFloat.cpp:43:
In file included from C:\_work\llvm-project\llvm-project\llvm\..\libc\shared/math.h:14:
In file included from C:\_work\llvm-project\llvm-project\llvm\..\libc\shared\math/acos.h:13:
In file included from C:\_work\llvm-project\llvm-project\llvm\..\libc\src/__support/math/acos.h:18:
In file included from C:\_work\llvm-project\llvm-project\llvm\..\libc\src/__support/FPUtil/sqrt.h:15:
In file included from C:\_work\llvm-project\llvm-project\llvm\..\libc\src/__support/FPUtil/generic/sqrt.h:16:
C:\_work\llvm-project\llvm-project\llvm\..\libc\src/__support/FPUtil/cast.h(79,14): error: initialization of incomplete type 'cpp::enable_if_t<cpp::is_floating_point_v<__llvm_libc_apfloat::fputil::Float16> && cpp::is_floating_point_v<float>, __llvm_libc_apfloat::fputil::Float16>' (aka '__llvm_libc_apfloat::fputil::Float16')
79 | return xd.template as<OutType, /*ShouldSignalExceptions=*/true>();
| ^
C:\_work\llvm-project\llvm-project\llvm\..\libc\src/__support/macros/properties/types.h(74,8): note: forward declaration of '__llvm_libc_apfloat::fputil::Float16'
74 | struct Float16;
| ^
In file included from C:\_work\llvm-project\llvm-project\llvm\lib\Support\APFloat.cpp:43:
In file included from C:\_work\llvm-project\llvm-project\llvm\..\libc\shared/math.h:16:
In file included from C:\_work\llvm-project\llvm-project\llvm\..\libc\shared\math/acosf.h:13:
In file included from C:\_work\llvm-project\llvm-project\llvm\..\libc\src/__support/math/acosf.h:15:
C:\_work\llvm-project\llvm-project\llvm\..\libc\src/__support/FPUtil/except_value_utils.h(174,12): error: calling 'cast<__llvm_libc_apfloat::fputil::Float16, float>' with incomplete return type 'cpp::enable_if_t<cpp::is_floating_point_v<__llvm_libc_apfloat::fputil::Float16> && cpp::is_floating_point_v<float>, __llvm_libc_apfloat::fputil::Float16>' (aka '__llvm_libc_apfloat::fputil::Float16')
174 | return cast<float16>(tmp);
| ^~~~~~~~~~~~~~~~~~
C:\_work\llvm-project\llvm-project\llvm\..\libc\src/__support/FPUtil/cast.h(28,1): note: 'cast' declared here
28 | cast(InType x) {
| ^
C:\_work\llvm-project\llvm-project\llvm\..\libc\src/__support/macros/properties/types.h(74,8): note: forward declaration of '__llvm_libc_apfloat::fputil::Float16'
74 | struct Float16;
| ^
In file included from C:\_work\llvm-project\llvm-project\llvm\lib\Support\APFloat.cpp:43:
In file included from C:\_work\llvm-project\llvm-project\llvm\..\libc\shared/math.h:16:
In file included from C:\_work\llvm-project\llvm-project\llvm\..\libc\shared\math/acosf.h:13:
In file included from C:\_work\llvm-project\llvm-project\llvm\..\libc\src/__support/math/acosf.h:15:
C:\_work\llvm-project\llvm-project\llvm\..\libc\src/__support/FPUtil/except_value_utils.h(181,1): error: incomplete result type 'float16' (aka '__llvm_libc_apfloat::fputil::Float16') in function definition
181 | round_result_slightly_up(float16 value_rn) {
| ^
C:\_work\llvm-project\llvm-project\llvm\..\libc\src/__support/macros/properties/types.h(74,8): note: forward declaration of '__llvm_libc_apfloat::fputil::Float16'
74 | struct Float16;
| ^
In file included from C:\_work\llvm-project\llvm-project\llvm\lib\Support\APFloat.cpp:43:
In file included from C:\_work\llvm-project\llvm-project\llvm\..\libc\shared/math.h:16:
In file included from C:\_work\llvm-project\llvm-project\llvm\..\libc\shared\math/acosf.h:13:
In file included from C:\_work\llvm-project\llvm-project\llvm\..\libc\src/__support/math/acosf.h:15:
C:\_work\llvm-project\llvm-project\llvm\..\libc\src/__support/FPUtil/except_value_utils.h(181,34): error: variable has incomplete type 'float16' (aka '__llvm_libc_apfloat::fputil::Float16')
181 | round_result_slightly_up(float16 value_rn) {
| ^
C:\_work\llvm-project\llvm-project\llvm\..\libc\src/__support/macros/properties/types.h(74,8): note: forward declaration of '__llvm_libc_apfloat::fputil::Float16'
74 | struct Float16;
| ^
In file included from C:\_work\llvm-project\llvm-project\llvm\lib\Support\APFloat.cpp:43:
In file included from C:\_work\llvm-project\llvm-project\llvm\..\libc\shared/math.h:16:
In file included from C:\_work\llvm-project\llvm-project\llvm\..\libc\shared\math/acosf.h:13:
In file included from C:\_work\llvm-project\llvm-project\llvm\..\libc\src/__support/math/acosf.h:15:
C:\_work\llvm-project\llvm-project\llvm\..\libc\src/__support/FPUtil/except_value_utils.h(192,12): error: no matching function for call to 'cast'
192 | return cast<float16>(tmp);
| ^~~~~~~~~~~~~
C:\_work\llvm-project\llvm-project\llvm\..\libc\src/__support/FPUtil/cast.h(28,1): note: candidate template ignored: substitution failure [with OutType = float16, InType = float]
28 | cast(InType x) {
| ^
In file included from C:\_work\llvm-project\llvm-project\llvm\lib\Support\APFloat.cpp:43:
In file included from C:\_work\llvm-project\llvm-project\llvm\..\libc\shared/math.h:17:
In file included from C:\_work\llvm-project\llvm-project\llvm\..\libc\shared\math/acosf16.h:17:
C:\_work\llvm-project\llvm-project\llvm\..\libc\src/__support/math/acosf16.h(29,31): error: incomplete result type 'float16' (aka '__llvm_libc_apfloat::fputil::Float16') in function definition
29 | LIBC_INLINE constexpr float16 acosf16(float16 x) {
| ^
C:\_work\llvm-project\llvm-project\llvm\..\libc\src/__support/macros/properties/types.h(74,8): note: forward declaration of '__llvm_libc_apfloat::fputil::Float16'
74 | struct Float16;
| ^
In file included from C:\_work\llvm-project\llvm-project\llvm\lib\Support\APFloat.cpp:43:
In file included from C:\_work\llvm-project\llvm-project\llvm\..\libc\shared/math.h:17:
In file included from C:\_work\llvm-project\llvm-project\llvm\..\libc\shared\math/acosf16.h:17:
C:\_work\llvm-project\llvm-project\llvm\..\libc\src/__support/math/acosf16.h(29,47): error: variable has incomplete type 'float16' (aka '__llvm_libc_apfloat::fputil::Float16')
29 | LIBC_INLINE constexpr float16 acosf16(float16 x) {
| ^
C:\_work\llvm-project\llvm-project\llvm\..\libc\src/__support/macros/properties/types.h(74,8): note: forward declaration of '__llvm_libc_apfloat::fputil::Float16'
74 | struct Float16;
| ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
```
</details>
If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label.
https://github.com/llvm/llvm-project/pull/184283
More information about the libc-commits
mailing list