diff options
author | Paolo Bonzini <bonzini@gnu.org> | 2008-04-03 05:38:32 +0000 |
---|---|---|
committer | Paolo Bonzini <bonzini@gcc.gnu.org> | 2008-04-03 05:38:32 +0000 |
commit | d2784db4e5b1950ca24582e3dd716af7f5e04906 (patch) | |
tree | 85505dacc4125c518bd797dee4270aa38c395fe9 /gcc/c-decl.c | |
parent | 0a262d5466e618a2df7c25c9eac7ef1d4497c0c7 (diff) | |
download | gcc-d2784db4e5b1950ca24582e3dd716af7f5e04906.zip gcc-d2784db4e5b1950ca24582e3dd716af7f5e04906.tar.gz gcc-d2784db4e5b1950ca24582e3dd716af7f5e04906.tar.bz2 |
c-objc-common.h (LANG_HOOKS_FUNCTION_ENTER_NESTED, [...]): Delete.
2008-04-03 Paolo Bonzini <bonzini@gnu.org>
* c-objc-common.h (LANG_HOOKS_FUNCTION_ENTER_NESTED,
LANG_HOOKS_FUNCTION_LEAVE_NESTED): Delete.
* c-tree.h (c_push_function_context, c_pop_function_context): Remove
argument.
* c-decl.c (c_push_function_context, c_pop_function_context): Remove
argument, call {push,pop}_function_context from here.
* c-parser.c: Use c_{push,pop}_function_context.
* function.c (push_function_context_to): Move meat ...
(push_function_context): ... here. Simplify.
* function.c (pop_function_context_from): Move meat ...
(pop_function_context): ... here. Simplify.
* langhooks.h (struct lang_hooks_for_functions): Remove enter_nested,
leave_nested).
* langhooks-def.h (LANG_HOOKS_FUNCTION_ENTER_NESTED,
LANG_HOOKS_FUNCTION_LEAVE_NESTED): Delete.
(LANG_HOOKS_FUNCTION_INITIALIZER): Delete them from here.
* tree.h (push_function_context_to, pop_function_context_from): Remove.
cp:
2008-04-03 Paolo Bonzini <bonzini@gnu.org>
* method.c (synthesize_method): Use {push,pop}_function_context.
* name-lookup.c (push_to_top_level): Likewise.
* parser.c (cp_parser_late_parsing_for_member): Likewise.
From-SVN: r133860
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r-- | gcc/c-decl.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c index d86bca0..3d38123 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -6886,11 +6886,11 @@ check_for_loop_decls (void) used during compilation of a C function. */ void -c_push_function_context (struct function *f) +c_push_function_context (void) { struct language_function *p; p = GGC_NEW (struct language_function); - f->language = p; + cfun->language = p; p->base.x_stmt_tree = c_stmt_tree; p->x_break_label = c_break_label; @@ -6901,14 +6901,20 @@ c_push_function_context (struct function *f) p->returns_null = current_function_returns_null; p->returns_abnormally = current_function_returns_abnormally; p->warn_about_return_type = warn_about_return_type; + + push_function_context (); } /* Restore the variables used during compilation of a C function. */ void -c_pop_function_context (struct function *f) +c_pop_function_context (void) { - struct language_function *p = f->language; + struct language_function *p; + + pop_function_context (); + p = cfun->language; + cfun->language = NULL; if (DECL_STRUCT_FUNCTION (current_function_decl) == 0 && DECL_SAVED_TREE (current_function_decl) == NULL_TREE) @@ -6929,8 +6935,6 @@ c_pop_function_context (struct function *f) current_function_returns_null = p->returns_null; current_function_returns_abnormally = p->returns_abnormally; warn_about_return_type = p->warn_about_return_type; - - f->language = NULL; } /* Copy the DECL_LANG_SPECIFIC data associated with DECL. */ |