Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

How about compilers having a way for us to tell it that a particular function must not be removed? It seems silly that we have to come up with hacks to work around the compiler.


They do. Every function they don't know about is considered important, potentially having side effects and the call will remain. Just call a function that exists in a library somewhere else (but use a static library and link-time optimization and that goes wrong again, because the optimizer knows the function then).


Or, for that matter, use a dynamic library and it can still go wrong! (hypothetical future JITter or somesuch)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: