+2017-04-24 Volker Reichelt <v.reichelt@netcologne.de>
+
+ * decl.c (grokdeclarator): Use %qT instead of %<%T%> in diagnostics.
+ (start_enum): Likewise.
+ (build_enumerator): Likewise. Use %qE instead of plain %E.
+ * parser.c (cp_parser_mem_initializer_list): Use %qD instead of
+ %<%D%> in diagnostics.
+ (cp_parser_elaborated_type_specifier): Likewise.
+ * pt.c (make_pack_expansion): Use %qT and %qE instead of
+ %<%T%> and %<%E%> in diagnostics.
+ (tsubst_pack_expansion): Likewise.
+
2017-04-24 David Malcolm <dmalcolm@redhat.com>
PR c++/80016
{
error (funcdef_flag || initialized
? G_("cannot define member function %<%T::%s%> "
- "within %<%T%>")
+ "within %qT")
: G_("cannot declare member function %<%T::%s%> "
- "within %<%T%>"),
+ "within %qT"),
ctype, name, current_class_type);
return error_mark_node;
}
else if (dependent_type_p (underlying_type))
ENUM_UNDERLYING_TYPE (enumtype) = underlying_type;
else
- error ("underlying type %<%T%> of %<%T%> must be an integral type",
+ error ("underlying type %qT of %qT must be an integral type",
underlying_type, enumtype);
}
&& TREE_CODE (value) == INTEGER_CST)
{
if (!int_fits_type_p (value, ENUM_UNDERLYING_TYPE (enumtype)))
- error ("enumerator value %E is outside the range of underlying "
- "type %<%T%>", value, ENUM_UNDERLYING_TYPE (enumtype));
+ error ("enumerator value %qE is outside the range of underlying "
+ "type %qT", value, ENUM_UNDERLYING_TYPE (enumtype));
/* Convert the value to the appropriate type. */
value = fold_convert (ENUM_UNDERLYING_TYPE (enumtype), value);
&& !TYPE_P (TREE_PURPOSE (mem_initializer)))
{
error_at (token->location,
- "cannot expand initializer for member %<%D%>",
+ "cannot expand initializer for member %qD",
TREE_PURPOSE (mem_initializer));
mem_initializer = error_mark_node;
}
|| cp_lexer_next_token_is_keyword (parser->lexer, RID_STRUCT))
{
pedwarn (input_location, 0, "elaborated-type-specifier "
- "for a scoped enum must not use the %<%D%> keyword",
+ "for a scoped enum must not use the %qD keyword",
cp_lexer_peek_token (parser->lexer)->u.value);
/* Consume the `struct' or `class' and parse it anyway. */
cp_lexer_consume_token (parser->lexer);
if (parameter_packs == NULL_TREE)
{
- error ("base initializer expansion %<%T%> contains no parameter packs", arg);
+ error ("base initializer expansion %qT contains no parameter packs", arg);
delete ppd.visited;
return error_mark_node;
}
if (parameter_packs == NULL_TREE)
{
if (TYPE_P (arg))
- error ("expansion pattern %<%T%> contains no argument packs", arg);
+ error ("expansion pattern %qT contains no argument packs", arg);
else
- error ("expansion pattern %<%E%> contains no argument packs", arg);
+ error ("expansion pattern %qE contains no argument packs", arg);
return error_mark_node;
}
PACK_EXPANSION_PARAMETER_PACKS (result) = parameter_packs;
if (!(complain & tf_error))
/* Fail quietly. */;
else if (TREE_CODE (t) == TYPE_PACK_EXPANSION)
- error ("mismatched argument pack lengths while expanding "
- "%<%T%>",
+ error ("mismatched argument pack lengths while expanding %qT",
pattern);
else
- error ("mismatched argument pack lengths while expanding "
- "%<%E%>",
+ error ("mismatched argument pack lengths while expanding %qE",
pattern);
return error_mark_node;
}