Today i came across nested functions which i had never heard of. Is it only part of GNU C?
Here is a wikipedia example of nested function.
float E(float x)
{
float F(float y)
{
return x + y;
}
return F(3);
}
From the code, it looks like nested functions are sort of C++ inline functions. So, is it possible to take out the address of nested function?
Edit:
The gcc link given by Adam says that nested function's code is created dynamically on stack. But how do you run code from stack? Shouldn't it be there in code segment.