diff options
author | Jason Merrill <jason@redhat.com> | 2011-09-26 22:13:00 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2011-09-26 22:13:00 -0400 |
commit | 9d84dbe6bacebc8f947cc0bb2bffe86fd8aeb5f0 (patch) | |
tree | 6b5c05b831d06418be10d3a2edb54708d1dfc3cd /gcc/cp | |
parent | 69d28b4f42a1226adb8507083314915dd4a69192 (diff) | |
download | gcc-9d84dbe6bacebc8f947cc0bb2bffe86fd8aeb5f0.zip gcc-9d84dbe6bacebc8f947cc0bb2bffe86fd8aeb5f0.tar.gz gcc-9d84dbe6bacebc8f947cc0bb2bffe86fd8aeb5f0.tar.bz2 |
re PR c++/45012 (Invalid ambiguity on partial class specialization matching)
PR c++/45102
* pt.c (tsubst_copy_and_build) [CONST_DECL]: Don't pull out
constant value if we're still in a template.
From-SVN: r179230
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/cp/pt.c | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index abde58c..22f3dde 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,9 @@ 2011-09-26 Jason Merrill <jason@redhat.com> + PR c++/45102 + * pt.c (tsubst_copy_and_build) [CONST_DECL]: Don't pull out + constant value if we're still in a template. + PR c++/46105 * typeck.c (structural_comptypes): Ignore cv-quals on typename scope. diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index cac45f9..4d57f94 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -13916,7 +13916,7 @@ tsubst_copy_and_build (tree t, t = tsubst_copy (t, args, complain, in_decl); /* As in finish_id_expression, we resolve enumeration constants to their underlying values. */ - if (TREE_CODE (t) == CONST_DECL) + if (TREE_CODE (t) == CONST_DECL && !processing_template_decl) { used_types_insert (TREE_TYPE (t)); return DECL_INITIAL (t); |