4 ms·
There are two possibilities the compiler is faced with, that the function pointer is null or that the external function was called and the function pointer is s
by jjnoakes 9y ago
There are two possibilities the compiler is faced with, that the function pointer is null or that the external function was called and the function pointer is set to a concrete function.
Since the null pointer option would lead to undefined behavior at runtime (no one is confusing cause and effect here) the compiler can ignore this case.
That leaves only one choice, and that's the result of the compilation.
It can be surprising but it makes sense.