GCC 如何确保堆栈不会溢出? 难道它不应该检查 Size 是否小于它可以保留的 MAX 并相应地提示用户,特别是在隐式定义时?这不是一个很好的编程范例吗?
最佳答案
事实并非如此。如果递归得足够深,就会溢出,而编译器对此无能为力。
<小时/>edit: I should point out that at the time I answered this question, the question simply read:
"How does GCC ensure that The Stack doesn't overflow?"
关于c - GCC 中如何维护递归调用堆栈?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14562800/