[clang] [clang][headers] Including stddef.h always redefines NULL (PR #99727)
Ian Anderson via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 22 12:35:29 PDT 2024
================
@@ -20,19 +20,18 @@
* modules.
*/
#if defined(__MVS__) && __has_include_next(<stdarg.h>)
-#include <__stdarg_header_macro.h>
#undef __need___va_list
#undef __need_va_list
#undef __need_va_arg
#undef __need___va_copy
#undef __need_va_copy
+#include <__stdarg_header_macro.h>
----------------
ian-twilightcoder wrote:
clang/test/Headers/stddefneeds.cpp verifies that NULL does and doesn't get redeclared when stddef.h gets included multiple times without modules, and clang/test/Modules/stddef.cpp verifies that NULL always gets declared when stddef.h is transitively included by a submodule.
https://github.com/llvm/llvm-project/pull/99727
More information about the cfe-commits
mailing list