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

Chris Lattner clattner at apple.com
Tue Nov 4 05:42:51 PST 2008


On Nov 3, 2008, at 10:53 PM, Anders Carlsson wrote:

> 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.

This is fine in the short term, but I don't think this will work in  
general.  Consider if you have:

somevarargsfunction(1, 2, NULL);

This will pass as an int, instead of as a pointer.  This matters on 64- 
bit targets.

GCC has a strange __null extension that it uses for C++ mode, should  
we add support for it?

-Chris





More information about the cfe-commits mailing list