aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorVolker Reichelt <v.reichelt@netcologne.de>2017-04-24 20:30:29 +0000
committerVolker Reichelt <reichelt@gcc.gnu.org>2017-04-24 20:30:29 +0000
commit761ad35c86ae6eb2101259feacc54ce409ca2ff5 (patch)
tree4fdb83c9cc16223cf32faf0e6675b989e4080a47 /gcc
parent412f61f0f6ee495f3dd076debd9db536aa386a26 (diff)
downloadgcc-761ad35c86ae6eb2101259feacc54ce409ca2ff5.zip
gcc-761ad35c86ae6eb2101259feacc54ce409ca2ff5.tar.gz
gcc-761ad35c86ae6eb2101259feacc54ce409ca2ff5.tar.bz2
decl.c (grokdeclarator): Use %qT instead of %<%T%> in
* 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. From-SVN: r247110
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog12
-rw-r--r--gcc/cp/decl.c10
-rw-r--r--gcc/cp/parser.c4
-rw-r--r--gcc/cp/pt.c12
4 files changed, 24 insertions, 14 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 97bf27f..ecdf616 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,15 @@
+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
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 8e9a466..8c8cf84 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -11433,9 +11433,9 @@ grokdeclarator (const cp_declarator *declarator,
{
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;
}
@@ -14150,7 +14150,7 @@ start_enum (tree name, tree enumtype, tree underlying_type,
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);
}
@@ -14560,8 +14560,8 @@ incremented enumerator value is too large for %<long%>"));
&& 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);
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index 3a0e0cb..31eb3d2 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -14084,7 +14084,7 @@ cp_parser_mem_initializer_list (cp_parser* parser)
&& !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;
}
@@ -17274,7 +17274,7 @@ cp_parser_elaborated_type_specifier (cp_parser* parser,
|| 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);
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index f8436b3..cf6ba6d 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -3701,7 +3701,7 @@ make_pack_expansion (tree arg)
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;
}
@@ -3765,9 +3765,9 @@ make_pack_expansion (tree arg)
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;
@@ -11409,12 +11409,10 @@ tsubst_pack_expansion (tree t, tree args, tsubst_flags_t complain,
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;
}