diff options
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/pt.c | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 7473cab..d7a843f 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2001-07-10 Mark Mitchell <mark@codesourcery.com> + + * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope + variables. + 2001-07-10 Jason Merrill <jason_merrill@redhat.com> * semantics.c (cp_expand_stmt): Fix for null diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index b601640..3d6279a 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -5946,12 +5946,13 @@ tsubst_decl (t, args, type) ctx = tsubst_aggr_type (DECL_CONTEXT (t), args, /*complain=*/1, in_decl, /*entering_scope=*/1); + else if (DECL_NAMESPACE_SCOPE_P (t)) + ctx = DECL_CONTEXT (t); else { /* Subsequent calls to pushdecl will fill this in. */ ctx = NULL_TREE; - if (!DECL_NAMESPACE_SCOPE_P (t)) - local_p = 1; + local_p = 1; } /* Check to see if we already have this specialization. */ |