[libcxx-commits] [libcxx] [libc++] __need_infinity_nan doesn't work in non-gnu c++ standards (PR #172539)
Ian Anderson via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Dec 16 21:14:06 PST 2025
================
@@ -0,0 +1,48 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// gcc supports "partitial inclusion" of some builtin headers via __need macros.
+// These are implemented in modules via textual headers, which are tricky to
+// support because libc++ needs to know about them and make its corresponding
+// headers textual too so that the macros are passed along.
+//
+// Another wrinkle is that __need macros can be used to force a type to be
+// when it wouldn't normally be. e.g. Apple platforms will use __need_rsize_t
+// to force the declaration of rsize_t to be visible even when
+// __STDC_WANT_LIB_EXT1__ isn't set.
+
+// gcc doesn't support all of the __need macros
+// UNSUPPORTED: gcc
+
+// The __need macros don't fully with in the frozen headers
+// UNSUPPORTED: c++03
+
+// Some of the __need macros are new in clang 22.x and Apple clang 21.x
+// UNSUPPORTED: clang-21, clang-22, apple-clang-20
----------------
ian-twilightcoder wrote:
I verified this locally, I think the version of clang-22 on the builders must not have picked up the float.h from https://github.com/llvm/llvm-project/pull/164348 yet?
https://github.com/llvm/llvm-project/pull/172539
More information about the libcxx-commits
mailing list