http://llvm.org/bugs/show_bug.cgi?id=12146

             Bug #: 12146
           Summary: clang's NULL definition in stddef.h clashes with
                    msvc's crtdefs.h
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Headers
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]
    Classification: Unclassified


Compiling

#include <stddef.h>
#include <crtdefs.h>
int* a = NULL

without -nobuiltininc yields:

test.cc:5:16: error: expected expression
int* a = __null;


That's because clang's stddef.h defines NULL to __null, but crtdefs.h
apparently defines __null to something else.


Not sure what the right fix is. Make __clang_null an alternate spelling of
__null and define NULL to __clang_null in stddef.h?

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to