Nested functions are evil and forbidden by ISO C standard.
I don't know what kind of black magic gcc is supposed to use to be able to find the local variables of the declaration scope when the nested function is called via a function pointer from outside. I suppose it will have to create some kind of trampoline on the stack, which means you lose non-exec stack capability for your program.
It may still be a bug that it doesn't work on ppc with some optimisations, but it's really not proper C in the first place.
Hrm, somebody is taking chances here.
Nested functions are evil and forbidden by ISO C standard.
I don't know what kind of black magic gcc is supposed to use to be able to find the local variables of the declaration scope when the nested function is called via a function pointer from outside. I suppose it will have to create some kind of trampoline on the stack, which means you lose non-exec stack capability for your program.
It may still be a bug that it doesn't work on ppc with some optimisations, but it's really not proper C in the first place.