[libc-commits] [libc] [libc][math] Qualify nextafter functions to constexpr (PR #195596)

LLVM Continuous Integration via libc-commits libc-commits at lists.llvm.org
Mon May 4 00:06:32 PDT 2026


llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `libc-x86_64-debian-gcc-fullbuild-dbg` running on `libc-x86_64-debian-fullbuild` while building `libc` at step 4 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/131/builds/45975

<details>
<summary>Here is the relevant piece of the build log for the reference</summary>

```
Step 4 (annotate) failure: 'python ../llvm-zorg/zorg/buildbot/builders/annotated/libc-linux.py ...' (failure)
...
[159/2021] Building CXX object libc/src/math/generic/CMakeFiles/libc.src.math.generic.remquo.dir/remquo.cpp.o
[160/2021] Building CXX object libc/src/math/generic/CMakeFiles/libc.src.math.generic.remquol.dir/remquol.cpp.o
[161/2021] Building CXX object libc/src/math/generic/CMakeFiles/libc.src.math.generic.nextafter.__internal__.dir/nextafter.cpp.o
[162/2021] Building CXX object libc/src/math/generic/CMakeFiles/libc.src.math.generic.nextafter.dir/nextafter.cpp.o
[163/2021] Building CXX object libc/src/math/generic/CMakeFiles/libc.src.math.generic.nextafter.__NO_FMA_OPT.__internal__.dir/nextafter.cpp.o
[164/2021] Building CXX object libc/src/math/generic/CMakeFiles/libc.src.math.generic.remquobf16.__internal__.dir/remquobf16.cpp.o
[165/2021] Building CXX object libc/src/math/generic/CMakeFiles/libc.src.math.generic.nextafter.__NO_FMA_OPT.dir/nextafter.cpp.o
[166/2021] Building CXX object libc/src/math/generic/CMakeFiles/libc.src.math.generic.nextafterf.__internal__.dir/nextafterf.cpp.o
[167/2021] Building CXX object libc/src/math/generic/CMakeFiles/libc.src.math.generic.nextafterf.dir/nextafterf.cpp.o
[168/2021] Building CXX object libc/src/math/generic/CMakeFiles/libc.src.math.generic.nextafterl.__internal__.dir/nextafterl.cpp.o
FAILED: libc/src/math/generic/CMakeFiles/libc.src.math.generic.nextafterl.__internal__.dir/nextafterl.cpp.o 
/usr/bin/g++ -DLIBC_NAMESPACE=__llvm_libc_20_0_0_git -D_DEBUG -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc -isystem /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/build/libc/include -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -Wimplicit-fallthrough -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-array-bounds -Wno-stringop-overread -Wno-dangling-pointer -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -g -mavx2 -mfma -DLIBC_QSORT_IMPL=LIBC_QSORT_QUICK_SORT -DLIBC_COPT_STRING_LENGTH_IMPL=clang_vector -DLIBC_COPT_FIND_FIRST_CHARACTER_IMPL=word -DLIBC_ADD_NULL_CHECKS -DLIBC_ERRNO_MODE=LIBC_ERRNO_MODE_DEFAULT -DLIBC_THREAD_MODE=LIBC_THREAD_MODE_PLATFORM -DLIBC_COPT_TIMEOUT_ENSURE_MONOTONICITY -DLIBC_CONF_WCTYPE_MODE=LIBC_WCTYPE_MODE_ASCII -DLIBC_COPT_RAW_MUTEX_DEFAULT_SPIN_COUNT=100 -fpie -ffreestanding -DLIBC_FULL_BUILD -isystem/usr/lib/gcc/x86_64-linux-gnu/12//include -nostdinc -idirafter/usr/include -fno-builtin -fno-exceptions -fno-lax-vector-conversions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -ftrivial-auto-var-init=pattern -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fstack-protector-strong -Wall -Wextra -Werror -Wconversion -Wno-sign-conversion -Wdeprecated -fext-numeric-literals -Wno-pedantic -Wimplicit-fallthrough -Wwrite-strings -Wextra-semi -std=gnu++17 -MD -MT libc/src/math/generic/CMakeFiles/libc.src.math.generic.nextafterl.__internal__.dir/nextafterl.cpp.o -MF libc/src/math/generic/CMakeFiles/libc.src.math.generic.nextafterl.__internal__.dir/nextafterl.cpp.o.d -o libc/src/math/generic/CMakeFiles/libc.src.math.generic.nextafterl.__internal__.dir/nextafterl.cpp.o -c /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/math/generic/nextafterl.cpp
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/math/generic/nextafterl.cpp:10:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/math/nextafterl.h: In function ‘constexpr long double __llvm_libc_20_0_0_git::math::nextafterl(long double, long double)’:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/math/nextafterl.h:20:27: error: call to non-‘constexpr’ function ‘long double __llvm_libc_20_0_0_git::fputil::nextafter(long double, long double)’
   20 |   return fputil::nextafter(x, y);
      |          ~~~~~~~~~~~~~~~~~^~~~~~
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/FPUtil/ManipulationFunctions.h:275,
                 from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/math/nextafterl.h:12:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/FPUtil/x86_64/NextAfterLongDouble.h:27:25: note: ‘long double __llvm_libc_20_0_0_git::fputil::nextafter(long double, long double)’ declared here
   27 | LIBC_INLINE long double nextafter(long double from, long double to) {
      |                         ^~~~~~~~~
[169/2021] Building CXX object libc/src/math/generic/CMakeFiles/libc.src.math.generic.nextafterl.dir/nextafterl.cpp.o
FAILED: libc/src/math/generic/CMakeFiles/libc.src.math.generic.nextafterl.dir/nextafterl.cpp.o 
/usr/bin/g++ -DLIBC_NAMESPACE=__llvm_libc_20_0_0_git -D_DEBUG -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc -isystem /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/build/libc/include -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -Wimplicit-fallthrough -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-array-bounds -Wno-stringop-overread -Wno-dangling-pointer -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -g -mavx2 -mfma -DLIBC_QSORT_IMPL=LIBC_QSORT_QUICK_SORT -DLIBC_COPT_STRING_LENGTH_IMPL=clang_vector -DLIBC_COPT_FIND_FIRST_CHARACTER_IMPL=word -DLIBC_ADD_NULL_CHECKS -DLIBC_ERRNO_MODE=LIBC_ERRNO_MODE_DEFAULT -DLIBC_THREAD_MODE=LIBC_THREAD_MODE_PLATFORM -DLIBC_COPT_TIMEOUT_ENSURE_MONOTONICITY -DLIBC_CONF_WCTYPE_MODE=LIBC_WCTYPE_MODE_ASCII -DLIBC_COPT_RAW_MUTEX_DEFAULT_SPIN_COUNT=100 -fpie -ffreestanding -DLIBC_FULL_BUILD -isystem/usr/lib/gcc/x86_64-linux-gnu/12//include -nostdinc -idirafter/usr/include -fno-builtin -fno-exceptions -fno-lax-vector-conversions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -ftrivial-auto-var-init=pattern -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fstack-protector-strong -Wall -Wextra -Werror -Wconversion -Wno-sign-conversion -Wdeprecated -fext-numeric-literals -Wno-pedantic -Wimplicit-fallthrough -Wwrite-strings -Wextra-semi -DLIBC_COPT_PUBLIC_PACKAGING -std=gnu++17 -MD -MT libc/src/math/generic/CMakeFiles/libc.src.math.generic.nextafterl.dir/nextafterl.cpp.o -MF libc/src/math/generic/CMakeFiles/libc.src.math.generic.nextafterl.dir/nextafterl.cpp.o.d -o libc/src/math/generic/CMakeFiles/libc.src.math.generic.nextafterl.dir/nextafterl.cpp.o -c /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/math/generic/nextafterl.cpp
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/math/generic/nextafterl.cpp:10:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/math/nextafterl.h: In function ‘constexpr long double __llvm_libc_20_0_0_git::math::nextafterl(long double, long double)’:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/math/nextafterl.h:20:27: error: call to non-‘constexpr’ function ‘long double __llvm_libc_20_0_0_git::fputil::nextafter(long double, long double)’
   20 |   return fputil::nextafter(x, y);
      |          ~~~~~~~~~~~~~~~~~^~~~~~
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/FPUtil/ManipulationFunctions.h:275,
                 from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/math/nextafterl.h:12:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/FPUtil/x86_64/NextAfterLongDouble.h:27:25: note: ‘long double __llvm_libc_20_0_0_git::fputil::nextafter(long double, long double)’ declared here
   27 | LIBC_INLINE long double nextafter(long double from, long double to) {
      |                         ^~~~~~~~~
[170/2021] Building CXX object libc/src/math/generic/CMakeFiles/libc.src.math.generic.remquobf16.__NO_FMA_OPT.__internal__.dir/remquobf16.cpp.o
[171/2021] Building CXX object libc/src/math/generic/CMakeFiles/libc.src.math.generic.remquobf16.dir/remquobf16.cpp.o
[172/2021] Building CXX object libc/src/math/generic/CMakeFiles/libc.src.math.generic.nextafterf.__NO_FMA_OPT.__internal__.dir/nextafterf.cpp.o
[173/2021] Building CXX object libc/src/math/generic/CMakeFiles/libc.src.math.generic.nextafterl.__NO_FMA_OPT.__internal__.dir/nextafterl.cpp.o
FAILED: libc/src/math/generic/CMakeFiles/libc.src.math.generic.nextafterl.__NO_FMA_OPT.__internal__.dir/nextafterl.cpp.o 
/usr/bin/g++ -DLIBC_NAMESPACE=__llvm_libc_20_0_0_git -D_DEBUG -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc -isystem /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/build/libc/include -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -Wimplicit-fallthrough -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-array-bounds -Wno-stringop-overread -Wno-dangling-pointer -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -g -DLIBC_QSORT_IMPL=LIBC_QSORT_QUICK_SORT -DLIBC_COPT_STRING_LENGTH_IMPL=clang_vector -DLIBC_COPT_FIND_FIRST_CHARACTER_IMPL=word -DLIBC_ADD_NULL_CHECKS -DLIBC_ERRNO_MODE=LIBC_ERRNO_MODE_DEFAULT -DLIBC_THREAD_MODE=LIBC_THREAD_MODE_PLATFORM -DLIBC_COPT_TIMEOUT_ENSURE_MONOTONICITY -DLIBC_CONF_WCTYPE_MODE=LIBC_WCTYPE_MODE_ASCII -DLIBC_COPT_RAW_MUTEX_DEFAULT_SPIN_COUNT=100 -fpie -ffreestanding -DLIBC_FULL_BUILD -isystem/usr/lib/gcc/x86_64-linux-gnu/12//include -nostdinc -idirafter/usr/include -fno-builtin -fno-exceptions -fno-lax-vector-conversions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -ftrivial-auto-var-init=pattern -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fstack-protector-strong -Wall -Wextra -Werror -Wconversion -Wno-sign-conversion -Wdeprecated -fext-numeric-literals -Wno-pedantic -Wimplicit-fallthrough -Wwrite-strings -Wextra-semi -std=gnu++17 -MD -MT libc/src/math/generic/CMakeFiles/libc.src.math.generic.nextafterl.__NO_FMA_OPT.__internal__.dir/nextafterl.cpp.o -MF libc/src/math/generic/CMakeFiles/libc.src.math.generic.nextafterl.__NO_FMA_OPT.__internal__.dir/nextafterl.cpp.o.d -o libc/src/math/generic/CMakeFiles/libc.src.math.generic.nextafterl.__NO_FMA_OPT.__internal__.dir/nextafterl.cpp.o -c /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/math/generic/nextafterl.cpp
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/math/generic/nextafterl.cpp:10:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/math/nextafterl.h: In function ‘constexpr long double __llvm_libc_20_0_0_git::math::nextafterl(long double, long double)’:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/math/nextafterl.h:20:27: error: call to non-‘constexpr’ function ‘long double __llvm_libc_20_0_0_git::fputil::nextafter(long double, long double)’
   20 |   return fputil::nextafter(x, y);
      |          ~~~~~~~~~~~~~~~~~^~~~~~
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/FPUtil/ManipulationFunctions.h:275,
                 from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/math/nextafterl.h:12:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/FPUtil/x86_64/NextAfterLongDouble.h:27:25: note: ‘long double __llvm_libc_20_0_0_git::fputil::nextafter(long double, long double)’ declared here
Step 8 (libc-unit-tests) failure: libc-unit-tests (failure)
...
[159/2021] Building CXX object libc/src/math/generic/CMakeFiles/libc.src.math.generic.remquo.dir/remquo.cpp.o
[160/2021] Building CXX object libc/src/math/generic/CMakeFiles/libc.src.math.generic.remquol.dir/remquol.cpp.o
[161/2021] Building CXX object libc/src/math/generic/CMakeFiles/libc.src.math.generic.nextafter.__internal__.dir/nextafter.cpp.o
[162/2021] Building CXX object libc/src/math/generic/CMakeFiles/libc.src.math.generic.nextafter.dir/nextafter.cpp.o
[163/2021] Building CXX object libc/src/math/generic/CMakeFiles/libc.src.math.generic.nextafter.__NO_FMA_OPT.__internal__.dir/nextafter.cpp.o
[164/2021] Building CXX object libc/src/math/generic/CMakeFiles/libc.src.math.generic.remquobf16.__internal__.dir/remquobf16.cpp.o
[165/2021] Building CXX object libc/src/math/generic/CMakeFiles/libc.src.math.generic.nextafter.__NO_FMA_OPT.dir/nextafter.cpp.o
[166/2021] Building CXX object libc/src/math/generic/CMakeFiles/libc.src.math.generic.nextafterf.__internal__.dir/nextafterf.cpp.o
[167/2021] Building CXX object libc/src/math/generic/CMakeFiles/libc.src.math.generic.nextafterf.dir/nextafterf.cpp.o
[168/2021] Building CXX object libc/src/math/generic/CMakeFiles/libc.src.math.generic.nextafterl.__internal__.dir/nextafterl.cpp.o
FAILED: libc/src/math/generic/CMakeFiles/libc.src.math.generic.nextafterl.__internal__.dir/nextafterl.cpp.o 
/usr/bin/g++ -DLIBC_NAMESPACE=__llvm_libc_20_0_0_git -D_DEBUG -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc -isystem /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/build/libc/include -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -Wimplicit-fallthrough -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-array-bounds -Wno-stringop-overread -Wno-dangling-pointer -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -g -mavx2 -mfma -DLIBC_QSORT_IMPL=LIBC_QSORT_QUICK_SORT -DLIBC_COPT_STRING_LENGTH_IMPL=clang_vector -DLIBC_COPT_FIND_FIRST_CHARACTER_IMPL=word -DLIBC_ADD_NULL_CHECKS -DLIBC_ERRNO_MODE=LIBC_ERRNO_MODE_DEFAULT -DLIBC_THREAD_MODE=LIBC_THREAD_MODE_PLATFORM -DLIBC_COPT_TIMEOUT_ENSURE_MONOTONICITY -DLIBC_CONF_WCTYPE_MODE=LIBC_WCTYPE_MODE_ASCII -DLIBC_COPT_RAW_MUTEX_DEFAULT_SPIN_COUNT=100 -fpie -ffreestanding -DLIBC_FULL_BUILD -isystem/usr/lib/gcc/x86_64-linux-gnu/12//include -nostdinc -idirafter/usr/include -fno-builtin -fno-exceptions -fno-lax-vector-conversions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -ftrivial-auto-var-init=pattern -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fstack-protector-strong -Wall -Wextra -Werror -Wconversion -Wno-sign-conversion -Wdeprecated -fext-numeric-literals -Wno-pedantic -Wimplicit-fallthrough -Wwrite-strings -Wextra-semi -std=gnu++17 -MD -MT libc/src/math/generic/CMakeFiles/libc.src.math.generic.nextafterl.__internal__.dir/nextafterl.cpp.o -MF libc/src/math/generic/CMakeFiles/libc.src.math.generic.nextafterl.__internal__.dir/nextafterl.cpp.o.d -o libc/src/math/generic/CMakeFiles/libc.src.math.generic.nextafterl.__internal__.dir/nextafterl.cpp.o -c /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/math/generic/nextafterl.cpp
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/math/generic/nextafterl.cpp:10:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/math/nextafterl.h: In function ‘constexpr long double __llvm_libc_20_0_0_git::math::nextafterl(long double, long double)’:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/math/nextafterl.h:20:27: error: call to non-‘constexpr’ function ‘long double __llvm_libc_20_0_0_git::fputil::nextafter(long double, long double)’
   20 |   return fputil::nextafter(x, y);
      |          ~~~~~~~~~~~~~~~~~^~~~~~
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/FPUtil/ManipulationFunctions.h:275,
                 from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/math/nextafterl.h:12:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/FPUtil/x86_64/NextAfterLongDouble.h:27:25: note: ‘long double __llvm_libc_20_0_0_git::fputil::nextafter(long double, long double)’ declared here
   27 | LIBC_INLINE long double nextafter(long double from, long double to) {
      |                         ^~~~~~~~~
[169/2021] Building CXX object libc/src/math/generic/CMakeFiles/libc.src.math.generic.nextafterl.dir/nextafterl.cpp.o
FAILED: libc/src/math/generic/CMakeFiles/libc.src.math.generic.nextafterl.dir/nextafterl.cpp.o 
/usr/bin/g++ -DLIBC_NAMESPACE=__llvm_libc_20_0_0_git -D_DEBUG -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc -isystem /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/build/libc/include -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -Wimplicit-fallthrough -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-array-bounds -Wno-stringop-overread -Wno-dangling-pointer -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -g -mavx2 -mfma -DLIBC_QSORT_IMPL=LIBC_QSORT_QUICK_SORT -DLIBC_COPT_STRING_LENGTH_IMPL=clang_vector -DLIBC_COPT_FIND_FIRST_CHARACTER_IMPL=word -DLIBC_ADD_NULL_CHECKS -DLIBC_ERRNO_MODE=LIBC_ERRNO_MODE_DEFAULT -DLIBC_THREAD_MODE=LIBC_THREAD_MODE_PLATFORM -DLIBC_COPT_TIMEOUT_ENSURE_MONOTONICITY -DLIBC_CONF_WCTYPE_MODE=LIBC_WCTYPE_MODE_ASCII -DLIBC_COPT_RAW_MUTEX_DEFAULT_SPIN_COUNT=100 -fpie -ffreestanding -DLIBC_FULL_BUILD -isystem/usr/lib/gcc/x86_64-linux-gnu/12//include -nostdinc -idirafter/usr/include -fno-builtin -fno-exceptions -fno-lax-vector-conversions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -ftrivial-auto-var-init=pattern -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fstack-protector-strong -Wall -Wextra -Werror -Wconversion -Wno-sign-conversion -Wdeprecated -fext-numeric-literals -Wno-pedantic -Wimplicit-fallthrough -Wwrite-strings -Wextra-semi -DLIBC_COPT_PUBLIC_PACKAGING -std=gnu++17 -MD -MT libc/src/math/generic/CMakeFiles/libc.src.math.generic.nextafterl.dir/nextafterl.cpp.o -MF libc/src/math/generic/CMakeFiles/libc.src.math.generic.nextafterl.dir/nextafterl.cpp.o.d -o libc/src/math/generic/CMakeFiles/libc.src.math.generic.nextafterl.dir/nextafterl.cpp.o -c /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/math/generic/nextafterl.cpp
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/math/generic/nextafterl.cpp:10:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/math/nextafterl.h: In function ‘constexpr long double __llvm_libc_20_0_0_git::math::nextafterl(long double, long double)’:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/math/nextafterl.h:20:27: error: call to non-‘constexpr’ function ‘long double __llvm_libc_20_0_0_git::fputil::nextafter(long double, long double)’
   20 |   return fputil::nextafter(x, y);
      |          ~~~~~~~~~~~~~~~~~^~~~~~
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/FPUtil/ManipulationFunctions.h:275,
                 from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/math/nextafterl.h:12:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/FPUtil/x86_64/NextAfterLongDouble.h:27:25: note: ‘long double __llvm_libc_20_0_0_git::fputil::nextafter(long double, long double)’ declared here
   27 | LIBC_INLINE long double nextafter(long double from, long double to) {
      |                         ^~~~~~~~~
[170/2021] Building CXX object libc/src/math/generic/CMakeFiles/libc.src.math.generic.remquobf16.__NO_FMA_OPT.__internal__.dir/remquobf16.cpp.o
[171/2021] Building CXX object libc/src/math/generic/CMakeFiles/libc.src.math.generic.remquobf16.dir/remquobf16.cpp.o
[172/2021] Building CXX object libc/src/math/generic/CMakeFiles/libc.src.math.generic.nextafterf.__NO_FMA_OPT.__internal__.dir/nextafterf.cpp.o
[173/2021] Building CXX object libc/src/math/generic/CMakeFiles/libc.src.math.generic.nextafterl.__NO_FMA_OPT.__internal__.dir/nextafterl.cpp.o
FAILED: libc/src/math/generic/CMakeFiles/libc.src.math.generic.nextafterl.__NO_FMA_OPT.__internal__.dir/nextafterl.cpp.o 
/usr/bin/g++ -DLIBC_NAMESPACE=__llvm_libc_20_0_0_git -D_DEBUG -I/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc -isystem /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/build/libc/include -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -Wimplicit-fallthrough -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-array-bounds -Wno-stringop-overread -Wno-dangling-pointer -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -g -DLIBC_QSORT_IMPL=LIBC_QSORT_QUICK_SORT -DLIBC_COPT_STRING_LENGTH_IMPL=clang_vector -DLIBC_COPT_FIND_FIRST_CHARACTER_IMPL=word -DLIBC_ADD_NULL_CHECKS -DLIBC_ERRNO_MODE=LIBC_ERRNO_MODE_DEFAULT -DLIBC_THREAD_MODE=LIBC_THREAD_MODE_PLATFORM -DLIBC_COPT_TIMEOUT_ENSURE_MONOTONICITY -DLIBC_CONF_WCTYPE_MODE=LIBC_WCTYPE_MODE_ASCII -DLIBC_COPT_RAW_MUTEX_DEFAULT_SPIN_COUNT=100 -fpie -ffreestanding -DLIBC_FULL_BUILD -isystem/usr/lib/gcc/x86_64-linux-gnu/12//include -nostdinc -idirafter/usr/include -fno-builtin -fno-exceptions -fno-lax-vector-conversions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -ftrivial-auto-var-init=pattern -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fstack-protector-strong -Wall -Wextra -Werror -Wconversion -Wno-sign-conversion -Wdeprecated -fext-numeric-literals -Wno-pedantic -Wimplicit-fallthrough -Wwrite-strings -Wextra-semi -std=gnu++17 -MD -MT libc/src/math/generic/CMakeFiles/libc.src.math.generic.nextafterl.__NO_FMA_OPT.__internal__.dir/nextafterl.cpp.o -MF libc/src/math/generic/CMakeFiles/libc.src.math.generic.nextafterl.__NO_FMA_OPT.__internal__.dir/nextafterl.cpp.o.d -o libc/src/math/generic/CMakeFiles/libc.src.math.generic.nextafterl.__NO_FMA_OPT.__internal__.dir/nextafterl.cpp.o -c /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/math/generic/nextafterl.cpp
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/math/generic/nextafterl.cpp:10:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/math/nextafterl.h: In function ‘constexpr long double __llvm_libc_20_0_0_git::math::nextafterl(long double, long double)’:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/math/nextafterl.h:20:27: error: call to non-‘constexpr’ function ‘long double __llvm_libc_20_0_0_git::fputil::nextafter(long double, long double)’
   20 |   return fputil::nextafter(x, y);
      |          ~~~~~~~~~~~~~~~~~^~~~~~
In file included from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/FPUtil/ManipulationFunctions.h:275,
                 from /home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/math/nextafterl.h:12:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/FPUtil/x86_64/NextAfterLongDouble.h:27:25: note: ‘long double __llvm_libc_20_0_0_git::fputil::nextafter(long double, long double)’ declared here

```

</details>

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


More information about the libc-commits mailing list