Are there "hard" reasons for using NULL in preference to 0 in C89/C99+, and interchanging them without a second thought as to deep concerns relating to standards compliance, even in code using very obscure aspects of C?
I am concerned with "hard" things like standards compliance, portability, undefined behaviour, unexpectedly different interactions with unanticipated corners of the language, whether the (hypothetical) Milliard Gargantubrain Segmented Memory Supercomputer would likely release its magic smoke, etc.
There is already a similar question on this site about C++, but I am not concerned about C++. I believe this is one of the areas where C++ behaviour may well differ from C.
In reality, issues of style and intent are important. But don't think that is useful to discuss in a Q&A forum, so they are not on-topic for this question.
The answers which I and others have found refer primarily to the use of NULL vs 0 in testing and assignment (a common case and one where it is safe to use them interchangeably). I'm asking if there is any thinking required at all to take arbitrarily weird but standards-compliant code which you have found, and syntactically substitute NULL for 0 (or possibly vice versa when the 0 is a pointer), ignoring whether that is a wise thing to do stylistically. It is hard to give examples of unanticipated interactions but, for example, function pointers often catch us out, maybe sizeof, ....
I've read the relevant standards sections which describe how 0 and NULL behave. Could someone help me with the impact of the way they are defined in the standard on interchanging them in obscure cases? Or else assure me that there are none.