This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: forcing tail/sibling call optimization


>>>>> "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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]