aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorPaolo Bonzini <bonzini@gnu.org>2008-04-03 05:38:32 +0000
committerPaolo Bonzini <bonzini@gcc.gnu.org>2008-04-03 05:38:32 +0000
commitd2784db4e5b1950ca24582e3dd716af7f5e04906 (patch)
tree85505dacc4125c518bd797dee4270aa38c395fe9 /gcc/cp
parent0a262d5466e618a2df7c25c9eac7ef1d4497c0c7 (diff)
downloadgcc-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/cp')
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/method.c4
-rw-r--r--gcc/cp/name-lookup.c4
-rw-r--r--gcc/cp/parser.c5
4 files changed, 12 insertions, 7 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index ac3deb4..6aaf392 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,9 @@
+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.
+
2008-03-30 Volker Reichelt <v.reichelt@netcologne.de>
PR c++/35578
diff --git a/gcc/cp/method.c b/gcc/cp/method.c
index 5d50f85..03cd443 100644
--- a/gcc/cp/method.c
+++ b/gcc/cp/method.c
@@ -772,7 +772,7 @@ synthesize_method (tree fndecl)
if (! context)
push_to_top_level ();
else if (nested)
- push_function_context_to (context);
+ push_function_context ();
input_location = DECL_SOURCE_LOCATION (fndecl);
@@ -810,7 +810,7 @@ synthesize_method (tree fndecl)
if (! context)
pop_from_top_level ();
else if (nested)
- pop_function_context_from (context);
+ pop_function_context ();
pop_deferring_access_checks ();
diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c
index 75bc6bd..94d1c8e 100644
--- a/gcc/cp/name-lookup.c
+++ b/gcc/cp/name-lookup.c
@@ -5101,7 +5101,7 @@ push_to_top_level (void)
if (cfun)
{
need_pop = true;
- push_function_context_to (NULL_TREE);
+ push_function_context ();
}
else
need_pop = false;
@@ -5180,7 +5180,7 @@ pop_from_top_level (void)
/* If we were in the middle of compiling a function, restore our
state. */
if (s->need_pop_function_context)
- pop_function_context_from (NULL_TREE);
+ pop_function_context ();
current_function_decl = s->function_decl;
skip_evaluation = s->skip_evaluation;
timevar_pop (TV_NAME_LOOKUP);
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index bb16edf..85295eb 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -17426,8 +17426,7 @@ cp_parser_late_parsing_for_member (cp_parser* parser, tree member_function)
function. */
function_scope = current_function_decl;
if (function_scope)
- push_function_context_to (function_scope);
-
+ push_function_context ();
/* Push the body of the function onto the lexer stack. */
cp_parser_push_lexer_for_tokens (parser, tokens);
@@ -17450,7 +17449,7 @@ cp_parser_late_parsing_for_member (cp_parser* parser, tree member_function)
/* Leave the scope of the containing function. */
if (function_scope)
- pop_function_context_from (function_scope);
+ pop_function_context ();
cp_parser_pop_lexer (parser);
}