]> granicus.if.org Git - clang/commitdiff
#define NULL as 0 when compiling as C++. This fixes the carbon.cpp and cocoa.mm test...
authorAnders Carlsson <andersca@mac.com>
Tue, 4 Nov 2008 06:53:14 +0000 (06:53 +0000)
committerAnders Carlsson <andersca@mac.com>
Tue, 4 Nov 2008 06:53:14 +0000 (06:53 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58685 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Headers/stddef.h

index 3e7e4dda0d2ea906ab1503835764697ca59ac648..d5f4eb9c7c29e041099f70e6edb5ae4d6a0319e2 100644 (file)
@@ -32,7 +32,12 @@ typedef __typeof__(sizeof(int)) size_t;
 typedef __typeof__(*L"") wchar_t;
 #endif
 
+#ifdef __cplusplus
+#define NULL (0)
+#else
 #define NULL ((void*)0)
+#endif
+
 #define offsetof(t, d) __builtin_offsetof(t, d)
 
 #endif /* __STDDEF_H */