Just wanted to mention that GNU C has supported nested functions since forever, it's one of the main reasons I prefer GCC over Clang these days.
YES it is dangerous due to stacks etc etc but hey, we're grown up adults, not script kiddies.
That is how CVEs are born.
C does not.