diff options
author | Mark Mitchell <mark@codesourcery.com> | 2006-01-19 06:55:53 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 2006-01-19 06:55:53 +0000 |
commit | c888c93b290aeb3f7eb556bd5b7ed4f7564c822a (patch) | |
tree | 7783dc30a654ed3f4012aa97244eb51ffd2fa604 /gcc/cp/name-lookup.c | |
parent | e79b9d54a17db3d8676ae30c1f04e90e90691cec (diff) | |
download | gcc-c888c93b290aeb3f7eb556bd5b7ed4f7564c822a.zip gcc-c888c93b290aeb3f7eb556bd5b7ed4f7564c822a.tar.gz gcc-c888c93b290aeb3f7eb556bd5b7ed4f7564c822a.tar.bz2 |
re PR c++/25836 (G++ does not allow a conversion of templated types)
PR c++/25836
* cp-tree.h (push_class_stack): New function.
(pop_class_stack): Likewise.
* class.c (class_stack_node): Add hidden field.
(pushclass): Clear it.
(push_class_stack): New function.
(pop_class_stack): Likewise.
(currently_open_class): Ignore hidden classes.
(currently_open_derived_class): Likewise.
* name-lookup.c (push_to_top_level): Call push_class_stack.
(pop_from_top_level): Call pop_class_stack.
PR c++/25836
* g++.dg/template/init6.C: New test.
From-SVN: r109945
Diffstat (limited to 'gcc/cp/name-lookup.c')
-rw-r--r-- | gcc/cp/name-lookup.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c index 4a6c627..02fc272 100644 --- a/gcc/cp/name-lookup.c +++ b/gcc/cp/name-lookup.c @@ -4938,6 +4938,7 @@ push_to_top_level (void) current_lang_base = VEC_alloc (tree, gc, 10); current_lang_name = lang_name_cplusplus; current_namespace = global_namespace; + push_class_stack (); skip_evaluation = 0; timevar_pop (TV_NAME_LOOKUP); } @@ -4953,6 +4954,7 @@ pop_from_top_level (void) /* Clear out class-level bindings cache. */ if (previous_class_level) invalidate_class_lookup_cache (); + pop_class_stack (); current_lang_base = 0; |