Possible Duplicate:
Which, if any, C++ compilers do tail-recursion optimization?
I'm writing a small runtime for a Lisp-like language for educational purposes, but I'd like to make sure the C code is tail-call optimized, since I'm depending on it in my language. Are there any compilers which guarantee tail-call recursion being optimized? If so, is there documentation of what rules there are for causing the recursion to be optimized?
Obiviously, gcc or clang would be nice, but I need to ensure that code is being properly optimized, since it depends on it.