[libcxx-commits] [libcxx] [libc++] Conditionally declare `lgamma_r` as noexcept (PR #156547)

Nico Weber via libcxx-commits libcxx-commits at lists.llvm.org
Tue Sep 9 08:30:05 PDT 2025


nico wrote:

https://llvm.org/devmtg/2021-11/slides/2021-BuildinganOperatingSystemfromScratchwithLLVM.pdf says "We are evolving our C library and incrementally replacing existing parts with LLVM libc counterparts". I suppose that means we're going down the `__LLVM_LIBC__` branch.

libc headers originally didn't have noexcept in math.h, see LHS of https://reviews.llvm.org/D76723 which moved to a first header generation script. That script learned to write noexcept in https://reviews.llvm.org/D141095 in early 2023. The Fuchsia SDK seems to ship headers that don't have that yet. (Or it doesn't use LLVM libc's math.h header at all, but uses enough of it that __LLVM_LIBC__ ends up being set.)

(That header generation script was then later replaced by a different header generation script, which seems to have printed NOEXCEPT from the start, and which is the mechanism that's currently in use.)

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


More information about the libcxx-commits mailing list