GCC complains about nested functions despite none being present
Segher Boessenkool
segher@kernel.crashing.org
Mon Jun 26 09:13:00 GMT 2017
On Sun, Jun 25, 2017 at 06:27:38PM -0400, Jeffrey Walton wrote:
> It may be more than a minor bug. The trampoline often requires an
> executable stack, and that's usually a SDLC violation.
Nested functions often do not need trampolines, they just need an
environment pointer (the static chain). Trampolines are only needed
if you pass around the address of a nested function, and it needs one
of its parents frames, and your function pointers do not hold space
for an environment pointer already. Trampolines do not need an
executable stack, it's just the traditional way to implement them
(and a very convenient and on most archs very efficient way).
Segher
More information about the Gcc-help
mailing list