From 96e0afdeb86fd4283991dd5f934cbb7d67562627 Mon Sep 17 00:00:00 2001 From: jason Date: Tue, 8 Sep 2009 18:12:45 +0000 Subject: [PATCH] * name-lookup.c (is_class_level): Remove. (push_binding_level, leave_scope, resume_scope): Adjust. (pushlevel_class): Adjust. (poplevel_class): Make sure we're on class_binding_level. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@151527 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/cp/ChangeLog | 7 +++++++ gcc/cp/name-lookup.c | 16 +--------------- 2 files changed, 8 insertions(+), 15 deletions(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 69eb476..20ce758 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,10 @@ +2009-09-03 Jason Merrill + + * name-lookup.c (is_class_level): Remove. + (push_binding_level, leave_scope, resume_scope): Adjust. + (pushlevel_class): Adjust. + (poplevel_class): Make sure we're on class_binding_level. + 2009-09-02 Jason Merrill * decl.c (grokmethod): Rename from start_method. diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c index feb2cf2..4928506 100644 --- a/gcc/cp/name-lookup.c +++ b/gcc/cp/name-lookup.c @@ -1257,7 +1257,6 @@ check_for_out_of_scope_variable (tree decl) static bool keep_next_level_flag; static int binding_depth = 0; -static int is_class_level = 0; static void indent (int depth) @@ -1339,7 +1338,6 @@ push_binding_level (struct cp_binding_level *scope) scope->binding_depth = binding_depth; indent (binding_depth); cxx_scope_debug (scope, input_line, "push"); - is_class_level = 0; binding_depth++; } } @@ -1427,12 +1425,6 @@ leave_scope (void) { indent (--binding_depth); cxx_scope_debug (scope, input_line, "leave"); - if (is_class_level != (scope == class_binding_level)) - { - indent (binding_depth); - verbatim ("XXX is_class_level != (current_scope == class_scope)\n"); - } - is_class_level = 0; } /* Move one nesting level up. */ @@ -1482,7 +1474,6 @@ resume_scope (struct cp_binding_level* b) b->binding_depth = binding_depth; indent (binding_depth); cxx_scope_debug (b, input_line, "resume"); - is_class_level = 0; binding_depth++; } } @@ -2562,9 +2553,6 @@ pop_inner_scope (tree outer, tree inner) void pushlevel_class (void) { - if (ENABLE_SCOPE_CHECKING) - is_class_level = 1; - class_binding_level = begin_scope (sk_class, current_class_type); } @@ -2602,9 +2590,7 @@ poplevel_class (void) /* Now, pop out of the binding level which we created up in the `pushlevel_class' routine. */ - if (ENABLE_SCOPE_CHECKING) - is_class_level = 1; - + gcc_assert (current_binding_level == level); leave_scope (); timevar_pop (TV_NAME_LOOKUP); } -- 2.7.4