4 ms·
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 aro
by rohit89 12y ago
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.
- ygra 12y agoThey 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).
- TheLoneWolfling 12y agoOr, for that matter, use a dynamic library and it can still go wrong! (hypothetical future JITter or somesuch)