Will the compiler produce the same code for both of these statements?
foo1(int* val){(*val)++;}
foo2(int &val){val++;}
Will it simply write a pointer into the parameter part of foo's stack frame? Or, in the second case, will the callers' and foos' stack frames somehow overlap such that the callers' local variable takes the same memory on the stack as the parameter for foo?