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

From-SVN: r18383
This commit is contained in:
Jason Merrill 1998-03-03 01:57:32 +00:00 committed by Jason Merrill
parent 5f9e09cd6c
commit 4943217104
2 changed files with 9 additions and 0 deletions

View File

@ -1,5 +1,7 @@
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
*type_unification* and unify.

View File

@ -5290,6 +5290,13 @@ unify (tparms, targs, ntparms, parm, arg, strict)
if (arg == parm)
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))
{
case TYPENAME_TYPE: