Y
Hacker News
new
|
ask
|
show
|
jobs
by
hoosieree
1345 days ago
GCC has an extension for 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.
1 comments
Jtsummers
1345 days ago
Yeah, 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).
link