My feeling is that essentially 100% of the time this is what you would want to happen, but I suspect that there might be some theoretical caveats, for example:
Say I statically link the standard library and I use printf
but not sprintf
. Further suppose that I know that &sprintf == &printf + SPRINTF_OFFSET
. How could the compiler know I'm never accessing sprintf
like this? Does the standard prohibit it somehow?