Shriramana, On 4/4/07, Shriramana Sharma <samjnaa@xxxxxxxxx> wrote:
Hello. As per my understanding, an inline function is replaced in place by the compiler with the body of the function, so it does not have a separate location in memory in contrast with a regular function. This being so, how is it possible to extract a pointer to an inline function and effectively use it? See the attached two examples. They work and though it's a good thing for my project that I can extract a pointer to an inline function I do not understand how it is possible.
Whenever you request a pointer to an inline function the compiler will place a normal subroutine version of the inline's implementation in an object file and return its address. So, effectively, the function pointer does not point to an inline function at all. \Steve -- Steve Grägert <steve@xxxxxxxxxxxx> Jabber xmpp://graegerts@xxxxxxxxxx Internet http://eth0.graegert.com, http://blog.graegert.com - To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html