GNU C “Nested Functions” Extension and Trampoline

Required background knowledge: activation record, static scoping & dynamic scoping.

Below is not standard C code. (case1)

foo (double a, double b){
  double square (double z) { return z * z; }    
  return square (a) + square (b);
}

Read more