But the person you are responding to specially said that they like it when the compiler determines things like this (where it is discernible from the code written that some of it is repetitive and unnecessary), and yet still has an issue when the compiler randomly goes and does something that can&#x27;t be demonstrated from the code because, in their words, &quot;the language said so&quot;.<p>My pet one of these is &quot;this (by which I mean the pointer of the current object, not the demonstrative pronoun ;P) cannot be NULL&quot;. clang has started outputting messages to me that it will soon stop honoring my checks that this is not NULL, entirely removing them from my code, even in cases where this actually can be NULL and the code is not guaranteed to crash in some predictable way. If the language helped me guarantee that this was never NULL, that would be one thing, but it doesn&#x27;t, and the compiler has decided, for reasons I don&#x27;t understand, to remove one of the only mechanisms I currently have to detect, log, and mitigate.<p>References are a similar thing: it would be one thing if dereferencing a NULL pointer caused my program to crash, so clearly the NULL checks on the address of a reference are not useful. But it doesn&#x27;t work like that. Dereferencing a NULL pointer returns a NULL reference that doesn&#x27;t cause a crash until the pointer is <i>used</i>. This is actually kind of similar to weakly-linked symbols, where a declared function can have its address be NULL. This is a feature of linkers and the compiler and puts people in a regime where it sometimes makes a lot of sense to compare the address of an expression with NULL.<p>But somehow, this one is special; so special that even though the compiler knew what I wanted so clearly it felt the need to spit out a paragraph of nonsense at me to tell me that I should remove this check, and that it really didn&#x27;t want this check in my code in the first place, if I was stupid enough to leave it in my code it was going to delete it for me. I just... I don&#x27;t understand how that is even remotely reasonable behavior. If it was a side effect of the optimizer and there was no way to surmise what I wanted, then that would be one thing: but the compiler is detecting my code, and demanding that either I remove it myself or it will take control? WTF.