tail call optimization vs. debugging
Geert Bosch
bosch@gnat.com
Sat Mar 25 13:08:00 GMT 2000
On Sat, 25 Mar 2000 21:50:46 +0100, Martin v. Loewis wrote:
Does this mean you don't want the compiler to support the inline
keyword? Because with inlining, you cannot set a break-point on an
inlined function, and get a useful stack backtrace with arguments
right now.
This is a different case, as this only applies to functions explicitly
marked inline. The user can usually see this in the sources, and
will expect that some debugging functionality may be lost.
In the case of tail call optimizations, this wouldn't be the case, and
the user might come to the wrong conclusion that the function has
not been called.
Fortunately Richard has clarified this issue a bit, although
it would be nice to force the compiler to put the arguments in place.
Richard wrote:
With tail recursion (which we had before, but will trigger more often
now) I can only say "probably". It's implemented with a goto internally,
so the optimizer has the chance to not put the new arguments in place.
More information about the Gcc
mailing list