diff options
author | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-07-11 06:24:57 +0000 |
---|---|---|
committer | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-07-11 06:24:57 +0000 |
commit | 3fc756e6ccdd62116e700df18fc61500b33b856d (patch) | |
tree | f94f395e0dfbb2305ee62e83935147dfac5c7069 /gcc/cp/pt.c | |
parent | 74b27b64774a3fef2d2bb53bc48a54776cd71bde (diff) | |
download | gcc-3fc756e6ccdd62116e700df18fc61500b33b856d.tar.gz |
* pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
variables.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@43924 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/pt.c')
-rw-r--r-- | gcc/cp/pt.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index b6016402e16..3d6279a8282 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. */ |