Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
lilyball
on Sept 24, 2017
|
parent
|
context
|
favorite
| on:
Why undefined behavior may call a never-called fun...
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.
gmueckl
on Sept 24, 2017
[–]
No, the function pointer is declared static. It cannot be referred to outside the current file.
DSrcl
on Sept 24, 2017
|
parent
[–]
The function pointer is static. But the function that mutates it, NeverCalled, is not. One can still indirectly change that function pointer.
Consider applying for YC's Spring batch! Applications are open till Feb 11.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: