Re: Tail recursion

Toon Moene <toon@moene.indiv.nluug.nl>
14 Aug 2000 17:35:40 -0400

          From comp.compilers

Related articles
Tail recursion strohm@airmail.net (2000-08-10)
Re: Tail recursion pfaffben@msu.edu (Ben Pfaff) (2000-08-13)
Re: Tail recursion danwang+news@cs.princeton.edu (Daniel C. Wang) (2000-08-14)
Re: Tail recursion toon@moene.indiv.nluug.nl (Toon Moene) (2000-08-14)
Re: Tail recursion fjh@cs.mu.OZ.AU (2000-08-21)
Re: Tail recursion Wilco.Dijkstra@arm.com (Wilco Dijkstra) (2000-08-21)
Re: Tail recursion mrs@kithrup.com (2000-08-21)
Re: Tail recursion ian0kerr@my-deja.com (2000-09-08)
Tail recursion Alexey.Mikhailov@gmail.com (jjb) (2006-11-04)
Re: Tail recursion kym@ukato.freeshell.org (russell kym horsell) (2006-11-04)
[3 later articles]
| List of all articles for this month |
From: Toon Moene <toon@moene.indiv.nluug.nl>
Newsgroups: comp.compilers
Date: 14 Aug 2000 17:35:40 -0400
Organization: Moene Computational Physics, Maartensdijk, The Netherlands
References: 00-08-054 00-08-071
Keywords: optimize

Ben Pfaff wrote


> strohm@airmail.net (John R. Strohm) writes:


> > Do any of the commonly-available compilers for "mainstream" languages
> > do tail recursion optimization? In particular, any C, c++, or Ada
> > compilers?


> The GCC compiler suite does tail recursion optimization at least
> for C and C++ and probably for its other languages as well.


Probably not for Fortran (g77), because the language g77 compiles (a -
small - superset of Fortran 77) does not admit recursion.


However, it might well be that the compiler doesn't recognise mutual
recursion (P calls Q which calls P) and happily generates code for it
that just *might* work :-(
--
Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
Saturnushof 14, 3738 XG Maartensdijk, The Netherlands
GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
GNU Fortran 95: http://g95.sourceforge.net/ (under construction)


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.