It does not need an executable stack: https://godbolt.org/z/K1GTa4jh4
https://thephd.dev/lambdas-nested-functions-block-expression...
(And also on -O1 and higher the entire call is optimized out and the nested function inlined instead.)
It's unfortunate a lot of the standards guys are horrified by anything that isn't C89. Because if the executable stack is an issue it's worth fixing.
Side note: 20 years ago people thought if they made the stack non executable that would totally fix stack smashing attacks and unfortunately it only slows down script kiddies.
Slowing them down is good. And: separating data and code helps simplify managing the caches.