diff options
author | Mark Mitchell <mark@codesourcery.com> | 2001-07-11 06:24:57 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 2001-07-11 06:24:57 +0000 |
commit | 2ba9c47ebd2de5826889bee5542029e69c7adc01 (patch) | |
tree | f94f395e0dfbb2305ee62e83935147dfac5c7069 /gcc/cp/pt.c | |
parent | 9556f88777b749e2e436b61073ea9d3c68630f42 (diff) | |
download | gcc-2ba9c47ebd2de5826889bee5542029e69c7adc01.zip gcc-2ba9c47ebd2de5826889bee5542029e69c7adc01.tar.gz gcc-2ba9c47ebd2de5826889bee5542029e69c7adc01.tar.bz2 |
pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope variables.
* pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
variables.
From-SVN: r43924
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 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. */ |