472,146 Members | 1,400 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,146 software developers and data experts.

g++ and tail recursion

We have been studying tail recursion in my computer class. The prof
told us that some compilers will turn a tail recursion into an
iteration thus allowing many, many function calls to the recursion. I
have proved to myself that the two flavors of VC++ I have will do this
but I cannot get the GNU G++ compiler to do so. It is run in unix on
a sun sparc and is version 3.3.2. It's threading is POSIX. Is there
a switch which will compile a tail recursion on g++ as an iteration?
Ray Wesley Kinserlow Jr.
Lubbock, Texas
rkinserlow at cox dot net
homepage: www.members.cox.net/rkinserlow
Mar 5 '06 #1
0 1754

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

10 posts views Thread by Christopher T King | last post: by
4 posts views Thread by Crutcher | last post: by
19 posts views Thread by Kay Schluehr | last post: by
11 posts views Thread by Josiah Manson | last post: by
35 posts views Thread by Muzammil | last post: by
reply views Thread by Saiars | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.