stmt.c (expand_return): Return if optimize_tail_recursion succeeded.

Jeffrey A Law law@hurl.cygnus.com
Sun Feb 28 18:15:00 GMT 1999


  In message < 199902122137.NAA07704@ada.cygnus.com.cygnus.com >you write:
  > I have checked in the following patch.
  > 
  > This fixes a problem where the cygwin compiler was calling abort while
  > compiling readline.  This was accidentally introduced Jan 8 when Jeff Law
  > created the new function optimize_tail_recursion.  A return statement in
  > expand_return was lost when that happened.
  > 
  > Simplified testcase (maybe this should be put in the testsuite?):
  > 
  > sub (int i)
  > {
  >   if (i == 0)
  >     return 0;
  >   else
  >     return sub (({int j; j = i - 1; j;}));
  > }
  > 
  > Patch:
  > 
  > Fri Feb 12 13:06:28 1999  Jim Wilson  <wilson@cygnus.com>
  > 
  > 	* stmt.c (expand_return): Return if optimize_tail_recursion succeeded.
  > 	(optimize_tail_recursion): Change return type from void to int.
  > 	Add return statements.
  > 	* tree.h (optimize_tail_recursion): Change prototype to match.
Thanks.  I feel silly and stoooopid :(

jeff



More information about the Gcc-patches mailing list