News for hackers. Stuff that matters.
Re:Why undefined behavior may call a never-called function by eridius on Sunday September 24, 2017 @03:26PM (#15326088)
How do you know it's never called? You can call the function from another file. It's not possible to know that the function is never called until link time.
Re:Why undefined behavior may call a never-called function by gmueckl on Sunday September 24, 2017 @05:47PM (#15326653)
No, the function pointer is declared static. It cannot be referred to outside the current file.
Re:Why undefined behavior may call a never-called function by DSrcl on Sunday September 24, 2017 @06:33PM (#15326846)
The function pointer is static. But the function that mutates it, NeverCalled, is not. One can still indirectly change that function pointer.