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


On Mon, Nov 27, 2000 at 10:45:14AM -0700, Jeffrey A Law wrote:
> I don't care if slows down or speeds up execution -- dependence on this kind
> of transformation in languages such as C is terribly bad.  C code which
> relies on this transformation is broken.

as has been pointed out, this kind of transformation cannot be
implemented as a simple optimization since it requires a different
calling convention. hence, it can only be implemented as a gnu
extension to the c language. as such, it is as legitimate as nested
functions or label pointers, imho.

> About the only thing worse would be to sit down, examine the compiler's output
> to see when it makes the transformation, then twiddle the code to make it
> compiler friendly, then complain when the next rev of the compiler doesn't
> behave in the same manner :-)

no. the semantics of this transformation have to be clearly specified.

bye
schani

-- 
Mark Probst
Student, Programmer, Juggler
http://www.complang.tuwien.ac.at/~schani/

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