I suggest moving the above post by FortranFan to the following thread, with a link to this thread (and possibly lock this thread because already “solved”).
The issue instead on this forum is some admins, especially @Beliavsky , are overeager in editing some posts without authorization and permission.
I believe moderators delete some posts partly because other user(s) flagged the post to have some issues (e.g., violating CoC). If you think there is some issues with CoC, I think it can be discussed in the above dedicated thread. IMHO, the mechanism of this kind of forum is not the same as some unmoderated ones (like comp.lang.fortran).
(This post of mine is not related to the thread topic (C_NULL_PTR), so please delete it anytime!)