Commit 49432171 by Jason Merrill Committed by Jason Merrill

* pt.c (unify): Don't allow reduced cv-quals when strict.

From-SVN: r18383
parent 5f9e09cd
Tue Mar 3 01:38:17 1998 Jason Merrill <jason@yorick.cygnus.com> Tue Mar 3 01:38:17 1998 Jason Merrill <jason@yorick.cygnus.com>
* pt.c (unify): Don't allow reduced cv-quals when strict.
* call.c, class.c, pt.c, cp-tree.h: Remove nsubsts parm from * call.c, class.c, pt.c, cp-tree.h: Remove nsubsts parm from
*type_unification* and unify. *type_unification* and unify.
......
...@@ -5290,6 +5290,13 @@ unify (tparms, targs, ntparms, parm, arg, strict) ...@@ -5290,6 +5290,13 @@ unify (tparms, targs, ntparms, parm, arg, strict)
if (arg == parm) if (arg == parm)
return 0; return 0;
/* We can't remove cv-quals when strict. */
if (strict && TREE_CODE (arg) == TREE_CODE (parm)
&& TREE_CODE_CLASS (TREE_CODE (arg)) == 't'
&& (TYPE_READONLY (arg) < TYPE_READONLY (parm)
|| TYPE_VOLATILE (arg) < TYPE_VOLATILE (parm)))
return 1;
switch (TREE_CODE (parm)) switch (TREE_CODE (parm))
{ {
case TYPENAME_TYPE: case TYPENAME_TYPE:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment