intype = complete_type (intype);
if (!COMPLETE_TYPE_P (intype))
{
- error ("can't convert from incomplete type `%T' to `%T'",
- intype, type);
+ error ("can't convert from incomplete type %qT to %qT",
+ intype, type);
return error_mark_node;
}
if (rval)
{
if (rval == error_mark_node)
- error ("conversion of `%E' from `%T' to `%T' is ambiguous",
- expr, intype, type);
+ error ("conversion of %qE from %qT to %qT is ambiguous",
+ expr, intype, type);
return rval;
}
}
if (TYPE_PTRMEMFUNC_P (type))
{
- error ("cannot convert `%E' from type `%T' to type `%T'",
- expr, intype, type);
+ error ("cannot convert %qE from type %qT to type %qT",
+ expr, intype, type);
return error_mark_node;
}
if (bk == bk_via_virtual)
{
if (force)
- warning ("pointer to member cast from `%T' to `%T' is via virtual base",
- intype, type);
+ warning ("pointer to member cast from %qT to %qT is via"
+ " virtual base", intype, type);
else
{
- error ("pointer to member cast from `%T' to `%T' is via virtual base",
- intype, type);
+ error ("pointer to member cast from %qT to %qT is"
+ " via virtual base", intype, type);
return error_mark_node;
}
/* This is a reinterpret cast, whose result is unspecified.
TREE_OPERAND (expr, 1));
}
}
- error ("cannot convert `%E' from type `%T' to type `%T'",
- expr, intype, type);
+ error ("cannot convert %qE from type %qT to type %qT",
+ expr, intype, type);
return error_mark_node;
}
}
else if (TYPE_PTR_TO_MEMBER_P (type) && INTEGRAL_CODE_P (form))
{
- error ("invalid conversion from '%T' to '%T'", intype, type);
+ error ("invalid conversion from %qT to %qT", intype, type);
return error_mark_node;
}
if (type_unknown_p (expr))
return instantiate_type (type, expr, tf_error | tf_warning);
- error ("cannot convert `%E' from type `%T' to type `%T'",
- expr, intype, type);
+ error ("cannot convert %qE from type %qT to type %qT",
+ expr, intype, type);
return error_mark_node;
}
const char *msg;
if (CP_TYPE_VOLATILE_P (ttl) && decl)
- msg = "initialization of volatile reference type `%#T' from rvalue of type `%T'";
+ msg = "initialization of volatile reference type %q#T from"
+ " rvalue of type %qT";
else if (CP_TYPE_VOLATILE_P (ttl))
- msg = "conversion to volatile reference type `%#T' from rvalue of type `%T'";
+ msg = "conversion to volatile reference type %q#T "
+ " from rvalue of type %qT";
else if (decl)
- msg = "initialization of non-const reference type `%#T' from rvalue of type `%T'";
+ msg = "initialization of non-const reference type %q#T from"
+ " rvalue of type %qT";
else
- msg = "conversion to non-const reference type `%#T' from rvalue of type `%T'";
+ msg = "conversion to non-const reference type %q#T from"
+ " rvalue of type %qT";
pedwarn (msg, reftype, intype);
}
if (! (convtype & CONV_CONST)
&& !at_least_as_qualified_p (ttl, ttr))
- pedwarn ("conversion from `%T' to `%T' discards qualifiers",
- ttr, reftype);
+ pedwarn ("conversion from %qT to %qT discards qualifiers",
+ ttr, reftype);
}
return build_up_reference (reftype, expr, flags, decl);
if (TREE_CODE (intype) == POINTER_TYPE
&& (comptypes (TREE_TYPE (intype), type,
COMPARE_BASE | COMPARE_DERIVED)))
- warning ("casting `%T' to `%T' does not dereference pointer",
+ warning ("casting %qT to %qT does not dereference pointer",
intype, reftype);
rval = build_unary_op (ADDR_EXPR, expr, 0);
}
if (flags & LOOKUP_COMPLAIN)
- error ("cannot convert type `%T' to type `%T'", intype, reftype);
+ error ("cannot convert type %qT to type %qT", intype, reftype);
return error_mark_node;
}
&& ((ARITHMETIC_TYPE_P (intype) && ! (convtype & CONV_STATIC))
|| (TREE_CODE (intype) == POINTER_TYPE)))
{
- pedwarn ("conversion from `%#T' to `%#T'", intype, type);
+ pedwarn ("conversion from %q#T to %q#T", intype, type);
if (flag_pedantic_errors)
return error_mark_node;
if (rval)
return rval;
if (flags & LOOKUP_COMPLAIN)
- error ("`%#T' used where a `%T' was expected", intype, type);
+ error ("%q#T used where a %qT was expected", intype, type);
return error_mark_node;
}
if (code == BOOLEAN_TYPE)
if (ret_val)
return ret_val;
if (flags & LOOKUP_COMPLAIN)
- error ("`%#T' used where a `%T' was expected", in_vtype, type);
+ error ("%q#T used where a %qT was expected", in_vtype, type);
return error_mark_node;
}
return fold_if_not_in_template (convert_to_vector (type, e));
return rval;
else
if (flags & LOOKUP_COMPLAIN)
- error ("`%#T' used where a floating point value was expected",
+ error ("%q#T used where a floating point value was expected",
TREE_TYPE (e));
}
if (code == REAL_TYPE)
}
if (flags & LOOKUP_COMPLAIN)
- error ("conversion from `%T' to non-scalar type `%T' requested",
- TREE_TYPE (expr), type);
+ error ("conversion from %qT to non-scalar type %qT requested",
+ TREE_TYPE (expr), type);
return error_mark_node;
}
int is_complete = COMPLETE_TYPE_P (complete_type (type));
if (is_volatile && !is_complete)
- warning ("object of incomplete type `%T' will not be accessed in %s",
- type, implicit ? implicit : "void context");
+ warning ("object of incomplete type %qT will not be accessed in %s",
+ type, implicit ? implicit : "void context");
else if (is_reference && is_volatile)
- warning ("object of type `%T' will not be accessed in %s",
- TREE_TYPE (TREE_OPERAND (expr, 0)),
- implicit ? implicit : "void context");
+ warning ("object of type %qT will not be accessed in %s",
+ TREE_TYPE (TREE_OPERAND (expr, 0)),
+ implicit ? implicit : "void context");
if (is_reference || !is_volatile || !is_complete)
expr = TREE_OPERAND (expr, 0);
int is_complete = COMPLETE_TYPE_P (complete_type (type));
if (TYPE_VOLATILE (type) && !is_complete)
- warning ("object `%E' of incomplete type `%T' will not be accessed in %s",
- expr, type, implicit ? implicit : "void context");
+ warning ("object %qE of incomplete type %qT will not be accessed in %s",
+ expr, type, implicit ? implicit : "void context");
break;
}
}
else if (implicit && probe == expr && is_overloaded_fn (probe))
/* Only warn when there is no &. */
- warning ("%s is a reference, not call, to function `%E'",
+ warning ("%s is a reference, not call, to function %qE",
implicit, expr);
}
{
if (complain)
{
- error ("ambiguous default type conversion from `%T'",
- basetype);
- error (" candidate conversions include `%D' and `%D'",
- winner, cand);
+ error ("ambiguous default type conversion from %qT",
+ basetype);
+ error (" candidate conversions include %qD and %qD",
+ winner, cand);
}
return error_mark_node;
}