g++ and tail recursion

  • Thread starter Ray Wesley Kinserlow Jr.
  • Start date
R

Ray Wesley Kinserlow Jr.

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top