[patch] Let stddef.h redefine NULL if __need_NULL is set

Nico Weber thakis at chromium.org
Mon Apr 28 19:52:11 PDT 2014


>> Let me know which one of the 3 patches (with 1 being the one I
>> originally sent) you like best. If it's 3, I'll add a few more tests
>> for that.
>
>
> I strongly prefer patch 3 over 2. (With just patch 2, I worry that some libc
> header would say "give me NULL and FOO", and just get NULL.)
>
> Instead of repeating an 'ifdef _STDDEF_H_imp' test, could you define all the
> __need_* macros in the _STDDEF_H_imp section? I'd find that slightly easier
> to reason about.

Done. Also added a test, and fixed bugs found by the test.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: clang-neednull-3.patch
Type: application/octet-stream
Size: 5580 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140428/778cf1b2/attachment.obj>


More information about the cfe-commits mailing list