diff options
author | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-05-29 19:07:04 +0000 |
---|---|---|
committer | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-05-29 19:07:04 +0000 |
commit | e4a33abd20e349979e77e2881fcd29dac9825ed6 (patch) | |
tree | bfc8d525b15b5bfee4c171fbc65c93caa3b86da7 /gcc/c-decl.c | |
parent | 9315255dea3778683104b8e2dee5fe6f650ae79c (diff) | |
download | gcc-e4a33abd20e349979e77e2881fcd29dac9825ed6.tar.gz |
2012-05-29 Meador Inge <meadori@codesourcery.com>
* c-decl.c (c_push_function_context): Always create a new language
function.
(c_pop_function_context): Clear the language function created in
c_push_function_context.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@187979 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r-- | gcc/c-decl.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c index 29cd18c7dcd..0c7e80e13c5 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -8577,11 +8577,9 @@ check_for_loop_decls (location_t loc, bool turn_off_iso_c99_error) void c_push_function_context (void) { - struct language_function *p = cfun->language; - /* cfun->language might have been already allocated by the use of - -Wunused-local-typedefs. In that case, just re-use it. */ - if (p == NULL) - cfun->language = p = ggc_alloc_cleared_language_function (); + struct language_function *p; + p = ggc_alloc_language_function (); + cfun->language = p; p->base.x_stmt_tree = c_stmt_tree; c_stmt_tree.x_cur_stmt_list @@ -8607,11 +8605,7 @@ c_pop_function_context (void) pop_function_context (); p = cfun->language; - /* When -Wunused-local-typedefs is in effect, cfun->languages is - used to store data throughout the life time of the current cfun, - So don't deallocate it. */ - if (!warn_unused_local_typedefs) - cfun->language = NULL; + cfun->language = NULL; if (DECL_STRUCT_FUNCTION (current_function_decl) == 0 && DECL_SAVED_TREE (current_function_decl) == NULL_TREE) |