[Ilugc] C pgm - Recursive -segmentation fault

  • From: sridharinfinity@xxxxxxxxx (Sridhar R)
  • Date: Tue Sep 14 20:16:47 2004

On Wed, 15 Sep 2004 00:39:44 +1000, Raja Subramanian 

Compiler optimisation is at work here.

Lookup "tail recursion elimination" in GCC docs or your favourite
compilers book.

IIRC, GCC can also to "tail call elimination".  Both of which can
eliminate the recursive function call and effectively turn it into a
loop.

AFAIK, when gcc is called with *no* command line options, *no*
optimization will be done.

-- 
Sridhar R - http://cs.annauniv.edu/~rsridhar
Blog: http://www.livejournal.com/~sridharinfinity

Other related posts: