forcing tail/sibling call optimization
Mark Mitchell
mark@codesourcery.com
Mon Nov 27 10:48:00 GMT 2000
>>>>> "Andi" == Andi Kleen <freitag@alancoxonachip.com> writes:
Andi> Problem I see with that is diagnostics again: e.g. someone
Andi> depends on a particular call being a tail call and not
Andi> allocating new storage.
The ANSI/ISO C way of doing this would be a #pragma (or _Pragma) near
the call site. In GCC, we could do that, or we could do something
like:
__tailcall__ (xyz (foo));
or something. But that magic should be only used for warnings -- it
should not be used to have the compiler generate different code.
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com
More information about the Gcc
mailing list