Maybe, maybe not - again this would need to be tested with a specific compiler, but:
This is a simple tail recursion:
void ThisFunc(int a) { ThisFunc(a); }
This isn't so simple, but could still be optimised away:
void ThisFunc(int a) { ThisFunc(a+1); }
This is a simple tail recursion (unused variable will be optimised away):
void ThisFunct() { int a=1; ThisFunc(); }
Basically, if you can conceive of a way to carry out the function without using a stack, then the optimiser
could[b] do it too </obvious statement>
Quote: "Darn - nothing is sacred anymore - darn meddling optimizers!"
I'll ask them to stop improving them immediately