Message ID | 4FC4FA0D.4000605@codesourcery.com |
---|---|
State | New |
Headers | show |
On Tue, 29 May 2012, Meador Inge wrote: > 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. Thanks, committed.
On 2012.05.29 at 19:07 +0000, Joseph S. Myers wrote: > On Tue, 29 May 2012, Meador Inge wrote: > > > 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. > > Thanks, committed. This patch caused http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53702
On 06/17/2012 09:28 AM, Markus Trippelsdorf wrote: > On 2012.05.29 at 19:07 +0000, Joseph S. Myers wrote: >> On Tue, 29 May 2012, Meador Inge wrote: >> >>> 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. >> >> Thanks, committed. > > This patch caused http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53702 Thanks. I am looking into it.
Index: gcc/c-decl.c =================================================================== --- gcc/c-decl.c (revision 187923) +++ gcc/c-decl.c (working copy) @@ -8579,11 +8579,9 @@ check_for_loop_decls (location_t loc, bo 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 @@ -8609,11 +8607,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)