This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Patch for TREE_NOTHROW


We should also deduce TREE_NOTHROW for inline functions that we aren't
writing out yet.

2000-03-10  Jason Merrill  <jason@casey.cygnus.com>

	* toplev.c (rest_of_compilation): Also set TREE_NOTHROW for
	deferred inlines.

Index: toplev.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/toplev.c,v
retrieving revision 1.303
diff -c -p -r1.303 toplev.c
*** toplev.c	2000/03/10 08:16:55	1.303
--- toplev.c	2000/03/10 19:45:43
*************** rest_of_compilation (decl)
*** 2967,2972 ****
--- 2967,2978 ----
  	      optimize = saved_optimize;
  	    }
  
+ 	  current_function_nothrow = nothrow_function_p ();
+ 	  if (current_function_nothrow)
+ 	    /* Now we know that this can't throw; set the flag for the benefit
+ 	       of other functions later in this translation unit.  */
+ 	    TREE_NOTHROW (current_function_decl) = 1;
+ 
  	  note_deferral_of_defined_inline_function (decl);
  	  TIMEVAR (integration_time, save_for_inline_nocopy (decl));
  	  DECL_SAVED_INSNS (decl)->inlinable = inlinable;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]