aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2011-09-26 22:12:51 -0400
committerJason Merrill <jason@gcc.gnu.org>2011-09-26 22:12:51 -0400
commit69d28b4f42a1226adb8507083314915dd4a69192 (patch)
tree252aadf72d57ed1807e5c65376923e98f5088fa0 /gcc/cp
parent15442c9c4fc7bb169629a75c170d801e9fa07fd7 (diff)
downloadgcc-69d28b4f42a1226adb8507083314915dd4a69192.zip
gcc-69d28b4f42a1226adb8507083314915dd4a69192.tar.gz
gcc-69d28b4f42a1226adb8507083314915dd4a69192.tar.bz2
re PR c++/46105 (Ordering failure among partial specializations with non-deduced context)
PR c++/46105 * typeck.c (structural_comptypes): Ignore cv-quals on typename scope. From-SVN: r179229
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog3
-rw-r--r--gcc/cp/typeck.c4
2 files changed, 6 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 0efa0d6..abde58c 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,5 +1,8 @@
2011-09-26 Jason Merrill <jason@redhat.com>
+ PR c++/46105
+ * typeck.c (structural_comptypes): Ignore cv-quals on typename scope.
+
PR c++/50508
* semantics.c (cxx_eval_logical_expression): Use tree_int_cst_equal
rather than ==.
diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c
index 955e37a..10f17bf 100644
--- a/gcc/cp/typeck.c
+++ b/gcc/cp/typeck.c
@@ -1300,7 +1300,9 @@ structural_comptypes (tree t1, tree t2, int strict)
if (!cp_tree_equal (TYPENAME_TYPE_FULLNAME (t1),
TYPENAME_TYPE_FULLNAME (t2)))
return false;
- if (!same_type_p (TYPE_CONTEXT (t1), TYPE_CONTEXT (t2)))
+ /* Qualifiers don't matter on scopes. */
+ if (!same_type_ignoring_top_level_qualifiers_p (TYPE_CONTEXT (t1),
+ TYPE_CONTEXT (t2)))
return false;
break;