2011-06-21 Jason Merrill <jason@redhat.com>
+ * call.c (add_builtin_candidates): Use cv_unqualified rather than
+ TYPE_MAIN_VARIANT.
+ * pt.c (tsubst_arg_types): Likewise.
+ * except.c (build_throw): Use cv_unqualified.
+
PR c++/49418
* call.c (cxx_type_promotes_to): Don't strip cv-quals.
* semantics.c (lambda_return_type): Strip them here.
type = non_reference (type);
if (i != 0 || ! ref1)
{
- type = TYPE_MAIN_VARIANT (type_decays_to (type));
+ type = cv_unqualified (type_decays_to (type));
if (enum_p && TREE_CODE (type) == ENUMERAL_TYPE)
VEC_safe_push (tree, gc, types[i], type);
if (INTEGRAL_OR_UNSCOPED_ENUMERATION_TYPE_P (type))
type = non_reference (argtypes[i]);
if (i != 0 || ! ref1)
{
- type = TYPE_MAIN_VARIANT (type_decays_to (type));
+ type = cv_unqualified (type_decays_to (type));
if (enum_p && UNSCOPED_ENUM_P (type))
VEC_safe_push (tree, gc, types[i], type);
if (INTEGRAL_OR_UNSCOPED_ENUMERATION_TYPE_P (type))
respectively. */
temp_type = is_bitfield_expr_with_lowered_type (exp);
if (!temp_type)
- temp_type = type_decays_to (TREE_TYPE (exp));
+ temp_type = cv_unqualified (type_decays_to (TREE_TYPE (exp)));
/* OK, this is kind of wacky. The standard says that we call
terminate when the exception handling mechanism, after
/* Do array-to-pointer, function-to-pointer conversion, and ignore
top-level qualifiers as required. */
- type = TYPE_MAIN_VARIANT (type_decays_to (type));
+ type = cv_unqualified (type_decays_to (type));
/* We do not substitute into default arguments here. The standard
mandates that they be instantiated only when needed, which is