You can reliably use 0 as a null pointer constant with one exception. When calling a varargs function which expects a pointer as an unnamed argument, and when pointers are 64-bits but int is 32-bits, then you must either use NULL or you must cast 0 to a pointer type.
Using NULL in this case is not portable; you *must* use a cast to the exact pointer type that the varargs function expects to see. Different pointer types can have different representation. Segher