[libc-commits] [libc] [llvm] [libc][math] Refactor sqrtf128 to header only (PR #177760)

via libc-commits libc-commits at lists.llvm.org
Sun Feb 1 12:22:43 PST 2026


Iasonaskrpr wrote:

I have applied the suggestions except the suggestion marking the prod_hi specialisations as static. Adding static here triggers a compiler error:

llvm-project/libc/src/__support/math/sqrtf128.h:78:39: error: explicit specialization cannot have a storage class [-Werror]
   78 | LIBC_INLINE static constexpr  UInt128 prod_hi<UInt128, uint64_t>(UInt128 x,
      |             ~~~~~~                    ^
1 error generated.

This happens for every one of the 6 specialisations. Is there any workaround for this or something I should do different?

https://github.com/llvm/llvm-project/pull/177760


More information about the libc-commits mailing list