[cfe-commits] r58685 - /cfe/trunk/lib/Headers/stddef.h

Anders Carlsson andersca at mac.com
Mon Nov 3 22:53:15 PST 2008


Author: andersca
Date: Tue Nov  4 00:53:14 2008
New Revision: 58685

URL: http://llvm.org/viewvc/llvm-project?rev=58685&view=rev
Log:
#define NULL as 0 when compiling as C++. This fixes the carbon.cpp and cocoa.mm test failures.

Modified:
    cfe/trunk/lib/Headers/stddef.h

Modified: cfe/trunk/lib/Headers/stddef.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/stddef.h?rev=58685&r1=58684&r2=58685&view=diff

==============================================================================
--- cfe/trunk/lib/Headers/stddef.h (original)
+++ cfe/trunk/lib/Headers/stddef.h Tue Nov  4 00:53:14 2008
@@ -32,7 +32,12 @@
 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 */





More information about the cfe-commits mailing list