aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-decl.c
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@gcc.gnu.org>2004-09-20 20:41:20 +0000
committerJan Hubicka <hubicka@gcc.gnu.org>2004-09-20 20:41:20 +0000
commit1a94c545f042021777073269af02e9f9b4fec043 (patch)
tree10b51dfad17b69271ca926de3da9916c61f5d835 /gcc/c-decl.c
parent8f2353433c31121e5ec31f24d70b80c385fb28ff (diff)
downloadgcc-1a94c545f042021777073269af02e9f9b4fec043.zip
gcc-1a94c545f042021777073269af02e9f9b4fec043.tar.gz
gcc-1a94c545f042021777073269af02e9f9b4fec043.tar.bz2
cgraph.c (cgraph_unnest_node): New function.
* cgraph.c (cgraph_unnest_node): New function. (c_finalize): Rename to .... (c_warn_unused_result_recursivly): ... this one; do only the warning (finish_function): Finalize the toplevel function; do not lower nested tree. * cgraph.h (cgraph_unnest_node): Declare. * cgraphunit.c (decide_is_function_needed): Do not use cgraph nestedness datastructure. * cse.c (cse_insn): Do not cprop nonlocal LABEL_REFs. * reload1.c (set_label_offsets): Fix call of set_label_offsets. * tree-nested.c (finlize_nesting_tree_1): Use un-nesting code. From-SVN: r87771
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r--gcc/c-decl.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index e1e8d4d..76c1a08 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -6128,30 +6128,21 @@ store_parm_decls (void)
cfun->x_dont_save_pending_sizes_p = 1;
}
-/* Give FNDECL and all its nested functions to cgraph for compilation. */
+/* Handle attribute((warn_unused_result)) on FNDECL and all its nested
+ functions. */
static void
-c_finalize (tree fndecl)
+c_warn_unused_result_recursively (tree fndecl)
{
struct cgraph_node *cgn;
/* Handle attribute((warn_unused_result)). Relies on gimple input. */
c_warn_unused_result (&DECL_SAVED_TREE (fndecl));
- /* ??? Objc emits functions after finalizing the compilation unit.
- This should be cleaned up later and this conditional removed. */
- if (cgraph_global_info_ready)
- {
- c_expand_body (fndecl);
- return;
- }
-
/* Finalize all nested functions now. */
cgn = cgraph_node (fndecl);
for (cgn = cgn->nested; cgn ; cgn = cgn->next_nested)
- c_finalize (cgn->decl);
-
- cgraph_finalize_function (fndecl, false);
+ c_warn_unused_result_recursively (cgn->decl);
}
/* Finish up a function declaration and compile that function
@@ -6255,8 +6246,17 @@ finish_function (void)
if (!decl_function_context (fndecl))
{
c_genericize (fndecl);
- lower_nested_functions (fndecl);
- c_finalize (fndecl);
+ c_warn_unused_result_recursively (fndecl);
+
+ /* ??? Objc emits functions after finalizing the compilation unit.
+ This should be cleaned up later and this conditional removed. */
+ if (cgraph_global_info_ready)
+ {
+ c_expand_body (fndecl);
+ return;
+ }
+
+ cgraph_finalize_function (fndecl, false);
}
else
{