diff options
author | Mark Mitchell <mark@markmitchell.com> | 1999-03-02 07:42:49 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 1999-03-02 07:42:49 +0000 |
commit | 83fdb19109ecbca5a3b21cd303b42edc2c8d7bc8 (patch) | |
tree | 7bf404b613c64710c6f445ee663df88c55ffb7fd /gcc | |
parent | 010deb4deab9a0b2304e3480ff786b06438a2c7d (diff) | |
download | gcc-83fdb19109ecbca5a3b21cd303b42edc2c8d7bc8.zip gcc-83fdb19109ecbca5a3b21cd303b42edc2c8d7bc8.tar.gz gcc-83fdb19109ecbca5a3b21cd303b42edc2c8d7bc8.tar.bz2 |
tree.c (save_tree_status): Don't treat functions with no context as nested.
* tree.c (save_tree_status): Don't treat functions with no context
as nested.
From-SVN: r25534
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/tree.c | 9 |
2 files changed, 11 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 57b03e4..6eb054b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +Tue Mar 2 07:44:56 1999 Mark Mitchell <mark@markmitchell.com> + + * tree.c (save_tree_status): Don't treat functions with no context + as nested. + Tue Mar 2 09:37:05 1999 Robert Lipe <robertlipe@usa.net> * Makefile.in (MAKEINFO): Use makeinfo built from sibling @@ -320,8 +320,11 @@ gcc_obstack_init (obstack) (void (*) ()) OBSTACK_CHUNK_FREE); } -/* Save all variables describing the current status into the structure *P. - This is used before starting a nested function. +/* Save all variables describing the current status into the structure + *P. This function is called whenever we start compiling one + function in the midst of compiling another. For example, when + compiling a nested function, or, in C++, a template instantiation + that is required by the function we are currently compiling. CONTEXT is the decl_function_context for the function we're about to compile; if it isn't current_function_decl, we have to play some games. */ @@ -345,7 +348,7 @@ save_tree_status (p, context) p->rtl_obstack = rtl_obstack; p->inline_obstacks = inline_obstacks; - if (context == current_function_decl) + if (current_function_decl && context == current_function_decl) /* Objects that need to be saved in this function can be in the nonsaved obstack of the enclosing function since they can't possibly be needed once it has returned. */ |