3 ms·
GCC has an extension for nested functions: https://gcc.gnu.org/onlinedocs/gcc/Nested-Functions.html#Nested-Functions https://gcc.gnu.org/onlinedocs/gcc/Nested-F
by hoosieree 4y ago
GCC has an extension for nested functions: https://gcc.gnu.org/onlinedocs/gcc/Nested-Functions.html#Nested-Functions https://gcc.gnu.org/onlinedocs/gcc/Nested-Functions.html#Nes...
Not as nice as anonymous blocks but helps put the function closer to where it's used, which is nice.
- Jtsummers 4y agoYeah, but the two dominant open source C compilers have chosen different approaches. This makes nested functions (gcc) and blocks (clang) both unusable if you want portable code even between the pair of them (and not generally).