[Not sure this is the right forum. Maybe stackoverflow.com would be a better place to discuss this.]
Tim Rühsen wrote: > BTW, nested functions are pretty nice to use. > > But I still wonder why > > - nested functions need an executable stack (why does the code have to > be run on the stack ?) Because in most ABIs, a function pointer is a pointer to the first instruction. The notable exceptions are: - PowerPC and PowerPC64 with AIX ABI, - ia64 - hppa, hppa64. See https://git.savannah.gnu.org/gitweb/?p=libffcall.git;a=blob;f=porting-tools/abis/function-pointer.txt > - there are no efforts to standardize either nested functions or blocks > (clang has 'blocks' instead of nested functions) or both. As far as I understand, this [1] would be a profound change of the C language. Possibly people feel that C shouldn't evolve in an uncontrolled and crazy way like C++ does... Bruno [1] https://en.wikipedia.org/wiki/Blocks_(C_language_extension)