This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch for TREE_NOTHROW
- To: gcc-patches at gcc dot gnu dot org
- Subject: Re: Patch for TREE_NOTHROW
- From: Jason Merrill <jason at cygnus dot com>
- Date: 10 Mar 2000 11:48:58 -0800
- References: <200003092031.MAA15538@casey.cygnus.com>
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;