[libcxx-commits] [libcxx] [libc++] Simplify the implementation of <stddef.h> (PR #86843)

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Tue Apr 9 16:47:48 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>
----------------
ldionne wrote:

Hmm, no that's not intentional. Is `-Wgnu-include-next` enabled by default? Why did we not see this anywhere else?

I can fix that but it would be nice to have a test that fails if we break this again in the future.

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


More information about the libcxx-commits mailing list