diff options
author | Jason Merrill <jason@redhat.com> | 2004-03-26 14:20:50 -0500 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2004-03-26 14:20:50 -0500 |
commit | 9b5c46c2011aec71a60b06c2a337bec0398c3efb (patch) | |
tree | feeec8a5210dd1a237b9aaff1ac1adf3684bac8a | |
parent | eb1a2c880a767e472e715c7587cb4ac3dc953bf9 (diff) | |
download | gcc-9b5c46c2011aec71a60b06c2a337bec0398c3efb.zip gcc-9b5c46c2011aec71a60b06c2a337bec0398c3efb.tar.gz gcc-9b5c46c2011aec71a60b06c2a337bec0398c3efb.tar.bz2 |
re PR c++/13294 (namespace associations vs. specializations)
PR c++/13294
* pt.c (maybe_process_partial_specialization): Remember the
context of a specialization.
From-SVN: r79992
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/pt.c | 10 |
2 files changed, 15 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index e59e9c1..e3d3a26 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2004-03-25 Jason Merrill <jason@redhat.com> + + PR c++/13294 + * pt.c (maybe_process_partial_specialization): Remember the + context of a specialization. + 2004-03-25 Kazu Hirata <kazu@cs.umass.edu> * cxx-pretty-print.c: Fix comment typos. diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index be2f2c7..3e3d0e9 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -733,7 +733,15 @@ maybe_process_partial_specialization (tree type) { tree tpl_ns = decl_namespace_context (CLASSTYPE_TI_TEMPLATE (type)); if (is_associated_namespace (current_namespace, tpl_ns)) - /* Same or super-using namespace. */; + /* Same or super-using namespace. */ + { + if (DECL_NAMESPACE_SCOPE_P (CLASSTYPE_TI_TEMPLATE (type))) + /* If this is a specialization of a namespace-scope class + template, remember the context of the + specialization. */ + TYPE_CONTEXT (type) = DECL_CONTEXT (TYPE_NAME (type)) + = FROB_CONTEXT (current_namespace); + } else { pedwarn ("specializing `%#T' in different namespace", type); |