This is the mail archive of the
mailing list for the GCC project.
Re: forcing tail/sibling call optimization
- To: freitag at alancoxonachip dot com
- Subject: Re: forcing tail/sibling call optimization
- From: Mark Mitchell <mark at codesourcery dot com>
- Date: Mon, 27 Nov 2000 10:48:33 -0800
- Cc: law at redhat dot com, gcc at gcc dot gnu dot org
- Organization: CodeSourcery, LLC
- References: <32243.975340713@upchuck><firstname.lastname@example.org>
>>>>> "Andi" == Andi Kleen <email@example.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
__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 firstname.lastname@example.org
CodeSourcery, LLC http://www.codesourcery.com