Re: Tail recursion

Toon Moene <>
14 Aug 2000 17:35:40 -0400

          From comp.compilers

Related articles
Tail recursion (2000-08-10)
Re: Tail recursion (Ben Pfaff) (2000-08-13)
Re: Tail recursion (Daniel C. Wang) (2000-08-14)
Re: Tail recursion (Toon Moene) (2000-08-14)
Re: Tail recursion (2000-08-21)
Re: Tail recursion (Wilco Dijkstra) (2000-08-21)
Re: Tail recursion (2000-08-21)
Re: Tail recursion (2000-09-08)
Tail recursion (jjb) (2006-11-04)
Re: Tail recursion (russell kym horsell) (2006-11-04)
[3 later articles]
| List of all articles for this month |

From: Toon Moene <>
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

> (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 - - phoneto: +31 346 214290
Saturnushof 14, 3738 XG Maartensdijk, The Netherlands
GNU Fortran 77:
GNU Fortran 95: (under construction)

Post a followup to this message

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