Commit ba9c33e8 by Jason Merrill Committed by Jason Merrill

* typeck.c (decay_conversion): Strip cv-quals from non-class rvalues.

From-SVN: r29762
parent 1bd83869
1999-10-01 Jason Merrill <jason@yorick.cygnus.com>
* typeck.c (decay_conversion): Strip cv-quals from non-class rvalues.
1999-10-01 Mark Mitchell <mark@codesourcery.com>
* pt.c (tsubst_decl): If the type of a template instantiation is
......
......@@ -1789,6 +1789,11 @@ decay_conversion (exp)
return cp_convert (ptrtype, adr);
}
/* [basic.lval]: Class rvalues can have cv-qualified types; non-class
rvalues always have cv-unqualified types. */
if (! CLASS_TYPE_P (type))
exp = cp_convert (TYPE_MAIN_VARIANT (type), exp);
return exp;
}
......
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