12.3. The Benefits of Nested Functions
Probably the main reason for nested functions being allowed
by GCC for flexibilities sake although small performance increases can
be gained by using them correctly. Nested functions obey
Lexical scoping, they have access to the
variables of the function that contains them.
For this reason, they can accomplish tasks that would usually
require functions taking pointers as arguments. There is a slight
performance loss when pointers are used because a variable that has a
pointer cannot be stored in a machine register. Pointers never point
to machine registers so how would the pointer work?