On Dez 04 2023, Siddhesh Poyarekar wrote: > For hardened code in C, I think we really should look to step away from > nested functions instead of adding ways to continue supporting it. There's > probably a larger conversation to be had about the utility of nested > functions in general for C (and whether this GCC extension should be > deprecated altogether in future), but I feel like the -fhardened subset > gives us the opportunity to enforce at least a safe subset for now, > possibly extending it in future.
Nested functions by itself don't need a trampoline, only if the address of it is passed outside the containing function's scope (as a callback, for example). -- Andreas Schwab, SUSE Labs, sch...@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different."