[libcxx-commits] [libcxx] [libc++] Simplify the implementation of <stddef.h> (PR #86843)
Nico Weber via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Apr 9 16:08:56 PDT 2024
================
@@ -36,16 +24,19 @@
*/
-# include <__config>
+#include <__config>
+
+// Note: This include is outside of header guards because we sometimes get included multiple times
+// with different defines and the underlying <stddef.h> will know how to deal with that.
+#include_next <stddef.h>
----------------
nico wrote:
Our builds now fail with
```
In file included from ../../base/allocator/partition_allocator/src\partition_alloc/partition_alloc_base/debug/alias.h:8:
In file included from ../../third_party/libc++/src/include\cstddef:42:
../../third_party/libc++/src/include\stddef.h(31,2): error: #include_next is a language extension [-Werror,-Wgnu-include-next]
31 | #include_next <stddef.h>
| ^
1 error generated.
```
…presumably because this is now before the `#pragma GCC system_header` below. Was that an intentional change?
(https://ci.chromium.org/ui/p/chromium/builders/try/win-rel/560031/overview)
https://github.com/llvm/llvm-project/pull/86843
More information about the libcxx-commits
mailing list