[LLVMdev] [cfe-dev] Style question: NULL or 0?

David Blaikie dblaikie at gmail.com
Wed Aug 17 17:23:46 PDT 2011


> using NULL gives you a false sense of security - which isn't entirely
> true now that compilers (GCC & clang
> presumably) will warn you about using NULL in non-pointer contexts.

Hmm, nope, can't seem to find that warning in clang - gcc gives it though:

foo.cpp:4:11: warning: converting to non-pointer type "int" from NULL



More information about the llvm-dev mailing list