aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog17
-rw-r--r--gcc/builtins.c4
-rw-r--r--gcc/c-family/ChangeLog6
-rw-r--r--gcc/c-family/c-attribs.c6
-rw-r--r--gcc/config/i386/i386.c4
-rw-r--r--gcc/cp/ChangeLog20
-rw-r--r--gcc/cp/call.c17
-rw-r--r--gcc/cp/constraint.cc2
-rw-r--r--gcc/cp/mangle.c14
-rw-r--r--gcc/cp/name-lookup.c7
-rw-r--r--gcc/cp/parser.c2
-rw-r--r--gcc/cp/pt.c11
-rw-r--r--gcc/cp/semantics.c2
-rw-r--r--gcc/cp/tree.c2
-rw-r--r--gcc/cp/typeck.c4
-rw-r--r--gcc/cp/typeck2.c2
-rw-r--r--gcc/hsa-gen.c18
-rw-r--r--gcc/objc/ChangeLog8
-rw-r--r--gcc/objc/objc-gnu-runtime-abi-01.c2
-rw-r--r--gcc/objc/objc-next-runtime-abi-01.c2
-rw-r--r--gcc/objc/objc-next-runtime-abi-02.c2
-rw-r--r--gcc/symtab.c2
-rw-r--r--gcc/testsuite/ChangeLog8
-rw-r--r--gcc/testsuite/g++.dg/abi/Wabi-2-3.C2
-rw-r--r--gcc/testsuite/g++.dg/abi/Wabi-3-2.C2
-rw-r--r--gcc/testsuite/g++.dg/lookup/using17.C4
-rw-r--r--gcc/testsuite/gcc.dg/format/gcc_diag-1.c27
-rw-r--r--gcc/varasm.c8
28 files changed, 135 insertions, 70 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index b344a90..3e93441 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,20 @@
+2017-05-04 Martin Sebor <msebor@redhat.com>
+
+ PR translation/80280
+ * builtins.c (expand_builtin_object_size): Add missing quoting to
+ %D and like directives.
+ * hsa-gen.c (hsa_type_for_scalar_tree_type): Same.
+ (hsa_type_for_tree_type): Same.
+ (verify_function_arguments): Same.
+ * symtab.c (symbol_table::change_decl_assembler_name): Same.
+ * varasm.c (get_section): Same.
+ (mark_weak): Same.
+
+2017-05-04 Martin Sebor <msebor@redhat.com>
+
+ PR translation/80280
+ * config/i386/i386.c (ix86_function_versions): Quote a %D directive.
+
2017-05-04 Wilco Dijkstra <wdijkstr@arm.com>
* config/aarch64/aarch64.c (generic_addrcost_table):
diff --git a/gcc/builtins.c b/gcc/builtins.c
index f3bee5b..5567fd2 100644
--- a/gcc/builtins.c
+++ b/gcc/builtins.c
@@ -9493,7 +9493,7 @@ expand_builtin_object_size (tree exp)
if (!validate_arglist (exp, POINTER_TYPE, INTEGER_TYPE, VOID_TYPE))
{
- error ("%Kfirst argument of %D must be a pointer, second integer constant",
+ error ("%Kfirst argument of %qD must be a pointer, second integer constant",
exp, fndecl);
expand_builtin_trap ();
return const0_rtx;
@@ -9506,7 +9506,7 @@ expand_builtin_object_size (tree exp)
|| tree_int_cst_sgn (ost) < 0
|| compare_tree_int (ost, 3) > 0)
{
- error ("%Klast argument of %D is not integer constant between 0 and 3",
+ error ("%Klast argument of %qD is not integer constant between 0 and 3",
exp, fndecl);
expand_builtin_trap ();
return const0_rtx;
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog
index 07a2e00..63d4197 100644
--- a/gcc/c-family/ChangeLog
+++ b/gcc/c-family/ChangeLog
@@ -1,3 +1,9 @@
+2017-05-04 Martin Sebor <msebor@redhat.com>
+
+ PR translation/80280
+ * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
+ (handle_weakref_attribute): Same.
+
2017-05-03 Nathan Sidwell <nathan@acm.org>
Canonicalize canonical type hashing
diff --git a/gcc/c-family/c-attribs.c b/gcc/c-family/c-attribs.c
index f2a88e1..695c58c 100644
--- a/gcc/c-family/c-attribs.c
+++ b/gcc/c-family/c-attribs.c
@@ -1780,9 +1780,9 @@ handle_alias_ifunc_attribute (bool is_alias, tree *node, tree name, tree args,
if (n && n->refuse_visibility_changes)
{
if (is_alias)
- error ("%+D declared alias after being used", decl);
+ error ("%+qD declared alias after being used", decl);
else
- error ("%+D declared ifunc after being used", decl);
+ error ("%+qD declared ifunc after being used", decl);
}
}
@@ -1867,7 +1867,7 @@ handle_weakref_attribute (tree *node, tree ARG_UNUSED (name), tree args,
{
struct symtab_node *n = symtab_node::get (*node);
if (n && n->refuse_visibility_changes)
- error ("%+D declared weakref after being used", *node);
+ error ("%+qD declared weakref after being used", *node);
}
return NULL_TREE;
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 9c429de..dec3aee 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -33069,10 +33069,10 @@ ix86_function_versions (tree fn1, tree fn2)
attr1 = attr2;
}
error_at (DECL_SOURCE_LOCATION (fn2),
- "missing %<target%> attribute for multi-versioned %D",
+ "missing %<target%> attribute for multi-versioned %qD",
fn2);
inform (DECL_SOURCE_LOCATION (fn1),
- "previous declaration of %D", fn1);
+ "previous declaration of %qD", fn1);
/* Prevent diagnosing of the same error multiple times. */
DECL_ATTRIBUTES (fn2)
= tree_cons (get_identifier ("target"),
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 06596e1..ef1809c 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,23 @@
+2017-05-04 Martin Sebor <msebor@redhat.com>
+
+ PR translation/80280
+ * call.c (print_z_candidate): Add missing quoting to %D and other
+ like directives.
+ (build_op_call_1): Same.
+ * constraint.cc (diagnose_check_constraint): Same.
+ * mangle.c (mangle_decl): Same.
+ * name-lookup.c (cp_binding_level_debug): Same.
+ (set_decl_namespace): Same.
+ * parser.c (cp_parser_tx_qualifier_opt): Same.
+ * pt.c (print_candidates_1): Same.
+ (check_template_variable): Same.
+ (tsubst_default_argument): Same.
+ (most_specialized_partial_spec): Same.
+ * semantics.c (omp_reduction_lookup): Same.
+ * tree.c (check_abi_tag_redeclaration): Same.
+ * typeck.c (comptypes): Same.
+ * typeck2.c (abstract_virtuals_error_sfinae): Same.
+
2017-05-04 Nathan Sidwell <nathan@acm.org>
More global trees.
diff --git a/gcc/cp/call.c b/gcc/cp/call.c
index 9110f4f..9401062 100644
--- a/gcc/cp/call.c
+++ b/gcc/cp/call.c
@@ -3457,26 +3457,26 @@ print_z_candidate (location_t loc, const char *msgstr,
{
cloc = loc;
if (candidate->num_convs == 3)
- inform (cloc, "%s%D(%T, %T, %T) <built-in>", msg, fn,
+ inform (cloc, "%<%s%D(%T, %T, %T) <built-in>%>", msg, fn,
candidate->convs[0]->type,
candidate->convs[1]->type,
candidate->convs[2]->type);
else if (candidate->num_convs == 2)
- inform (cloc, "%s%D(%T, %T) <built-in>", msg, fn,
+ inform (cloc, "%<%s%D(%T, %T) <built-in>%>", msg, fn,
candidate->convs[0]->type,
candidate->convs[1]->type);
else
- inform (cloc, "%s%D(%T) <built-in>", msg, fn,
+ inform (cloc, "%<%s%D(%T) <built-in>%>", msg, fn,
candidate->convs[0]->type);
}
else if (TYPE_P (fn))
- inform (cloc, "%s%T <conversion>", msg, fn);
+ inform (cloc, "%s%qT <conversion>", msg, fn);
else if (candidate->viable == -1)
- inform (cloc, "%s%#D <near match>", msg, fn);
+ inform (cloc, "%s%#qD <near match>", msg, fn);
else if (DECL_DELETED_FN (fn))
- inform (cloc, "%s%#D <deleted>", msg, fn);
+ inform (cloc, "%s%#qD <deleted>", msg, fn);
else
- inform (cloc, "%s%#D", msg, fn);
+ inform (cloc, "%s%#qD", msg, fn);
if (fn != candidate->fn)
{
cloc = location_of (candidate->fn);
@@ -4426,7 +4426,8 @@ build_op_call_1 (tree obj, vec<tree, va_gc> **args, tsubst_flags_t complain)
if (complain & tf_error)
/* It's no good looking for an overloaded operator() on a
pointer-to-member-function. */
- error ("pointer-to-member function %E cannot be called without an object; consider using .* or ->*", obj);
+ error ("pointer-to-member function %qE cannot be called without "
+ "an object; consider using %<.*%> or %<->*%>", obj);
return error_mark_node;
}
diff --git a/gcc/cp/constraint.cc b/gcc/cp/constraint.cc
index e91b116..a2c910d 100644
--- a/gcc/cp/constraint.cc
+++ b/gcc/cp/constraint.cc
@@ -2859,7 +2859,7 @@ diagnose_check_constraint (location_t loc, tree orig, tree cur, tree args)
{
if (elide_constraint_failure_p ())
return;
- inform (loc, "in the expansion of concept %qE %S", check, sub);
+ inform (loc, "in the expansion of concept %<E %S%>", check, sub);
cur = get_concept_definition (decl);
tsubst_expr (cur, targs, tf_warning_or_error, NULL_TREE, false);
return;
diff --git a/gcc/cp/mangle.c b/gcc/cp/mangle.c
index 6f7e21c..9ee74a7 100644
--- a/gcc/cp/mangle.c
+++ b/gcc/cp/mangle.c
@@ -3906,6 +3906,8 @@ mangle_decl (const tree decl)
if (warn_abi)
{
+ const char fabi_version[] = "-fabi-version";
+
if (flag_abi_compat_version != warn_abi_version
|| id2 == NULL_TREE)
{
@@ -3921,15 +3923,15 @@ mangle_decl (const tree decl)
&& abi_version_at_least (warn_abi_version))
warning_at (DECL_SOURCE_LOCATION (G.entity), OPT_Wabi,
"the mangled name of %qD changed between "
- "-fabi-version=%d (%D) and -fabi-version=%d (%D)",
- G.entity, warn_abi_version, id2,
- save_ver, id);
+ "%<%s=%d%> (%qD) and %<%s=%d%> (%qD)",
+ G.entity, fabi_version, warn_abi_version, id2,
+ fabi_version, save_ver, id);
else
warning_at (DECL_SOURCE_LOCATION (G.entity), OPT_Wabi,
"the mangled name of %qD changes between "
- "-fabi-version=%d (%D) and -fabi-version=%d (%D)",
- G.entity, save_ver, id,
- warn_abi_version, id2);
+ "%<%s=%d%> (%qD) and %<%s=%d%> (%qD)",
+ G.entity, fabi_version, save_ver, id,
+ fabi_version, warn_abi_version, id2);
}
flag_abi_version = save_ver;
diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c
index 43f334b..971a3bf 100644
--- a/gcc/cp/name-lookup.c
+++ b/gcc/cp/name-lookup.c
@@ -2070,7 +2070,7 @@ cp_binding_level_debug (cp_binding_level *scope, int line, const char *action)
{
const char *desc = cp_binding_level_descriptor (scope);
if (scope->this_entity)
- verbatim ("%s %s(%E) %p %d\n", action, desc,
+ verbatim ("%s %<%s(%E)%> %p %d\n", action, desc,
scope->this_entity, (void *) scope, line);
else
verbatim ("%s %s %p %d\n", action, desc, (void *) scope, line);
@@ -4154,8 +4154,9 @@ set_decl_namespace (tree decl, tree scope, bool friendp)
if (DECL_HIDDEN_FRIEND_P (found))
{
pedwarn (DECL_SOURCE_LOCATION (decl), 0,
- "%qD has not been declared within %D", decl, scope);
- inform (DECL_SOURCE_LOCATION (found), "only here as a friend");
+ "%qD has not been declared within %qD", decl, scope);
+ inform (DECL_SOURCE_LOCATION (found),
+ "only here as a %<friend%>");
}
DECL_CONTEXT (decl) = DECL_CONTEXT (found);
return;
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index 7197c19..ab56f12 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -20370,7 +20370,7 @@ cp_parser_tx_qualifier_opt (cp_parser *parser)
cp_lexer_consume_token (parser->lexer);
if (!flag_tm)
{
- error ("%E requires %<-fgnu-tm%>", name);
+ error ("%qE requires %<-fgnu-tm%>", name);
return NULL_TREE;
}
else
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 809f7b8..c4d402e 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -1943,14 +1943,14 @@ print_candidates_1 (tree fns, bool more, const char **str)
if (!more && !OVL_NEXT (fns))
{
inform (DECL_SOURCE_LOCATION (cand),
- "candidate is: %#D", cand);
+ "candidate is: %#qD", cand);
continue;
}
*str = _("candidates are:");
spaces = get_spaces (*str);
}
- inform (DECL_SOURCE_LOCATION (cand), "%s %#D", *str, cand);
+ inform (DECL_SOURCE_LOCATION (cand), "%s %#qD", *str, cand);
*str = spaces ? spaces : *str;
}
@@ -2583,7 +2583,8 @@ check_template_variable (tree decl)
if (template_header_count > wanted)
{
bool warned = pedwarn (DECL_SOURCE_LOCATION (decl), 0,
- "too many template headers for %D (should be %d)",
+ "too many template headers for %qD "
+ "(should be %d)",
decl, wanted);
if (warned && CLASS_TYPE_P (ctx)
&& CLASSTYPE_TEMPLATE_SPECIALIZATION (ctx))
@@ -11978,7 +11979,7 @@ tsubst_default_argument (tree fn, tree type, tree arg, tsubst_flags_t complain)
if (errorcount+sorrycount > errs
&& (complain & tf_warning_or_error))
inform (input_location,
- " when instantiating default argument for call to %D", fn);
+ " when instantiating default argument for call to %qD", fn);
/* Make sure the default argument is reasonable. */
arg = check_default_argument (type, arg, complain);
@@ -21895,7 +21896,7 @@ most_specialized_partial_spec (tree target, tsubst_flags_t complain)
{
tree subst = build_tree_list (TREE_VALUE (t), TREE_PURPOSE (t));
inform (DECL_SOURCE_LOCATION (TREE_VALUE (t)),
- "%s %#S", spaces ? spaces : str, subst);
+ "%s %#qS", spaces ? spaces : str, subst);
spaces = spaces ? spaces : get_spaces (str);
}
free (spaces);
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index 4db2462..df94a03 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -5255,7 +5255,7 @@ omp_reduction_lookup (location_t loc, tree id, tree type, tree *baselinkp,
error_at (loc, "user defined reduction lookup is ambiguous");
FOR_EACH_VEC_ELT (ambiguous, idx, udr)
{
- inform (DECL_SOURCE_LOCATION (udr), "%s %#D", str, udr);
+ inform (DECL_SOURCE_LOCATION (udr), "%s %#qD", str, udr);
if (idx == 0)
str = get_spaces (str);
}
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c
index 15b3ad9..ba1cb33 100644
--- a/gcc/cp/tree.c
+++ b/gcc/cp/tree.c
@@ -4027,7 +4027,7 @@ check_abi_tag_redeclaration (const_tree decl, const_tree old, const_tree new_)
if (cp_tree_equal (str, ostr))
goto found;
}
- error ("redeclaration of %qD adds abi tag %E", decl, str);
+ error ("redeclaration of %qD adds abi tag %qE", decl, str);
err = true;
found:;
}
diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c
index 7aee0d6..26ef5ed 100644
--- a/gcc/cp/typeck.c
+++ b/gcc/cp/typeck.c
@@ -1430,14 +1430,14 @@ comptypes (tree t1, tree t2, int strict)
canonical types were different. This is a failure of the
canonical type propagation code.*/
internal_error
- ("canonical types differ for identical types %T and %T",
+ ("canonical types differ for identical types %qT and %qT",
t1, t2);
else if (!result && TYPE_CANONICAL (t1) == TYPE_CANONICAL (t2))
/* Two types are structurally different, but the canonical
types are the same. This means we were over-eager in
assigning canonical types. */
internal_error
- ("same canonical type node for different types %T and %T",
+ ("same canonical type node for different types %qT and %qT",
t1, t2);
return result;
diff --git a/gcc/cp/typeck2.c b/gcc/cp/typeck2.c
index 1f0eb45..216736d 100644
--- a/gcc/cp/typeck2.c
+++ b/gcc/cp/typeck2.c
@@ -384,7 +384,7 @@ abstract_virtuals_error_sfinae (tree decl, tree type, abstract_class_use use,
FOR_EACH_VEC_ELT (*pure, ix, fn)
if (! DECL_CLONED_FUNCTION_P (fn)
|| DECL_COMPLETE_DESTRUCTOR_P (fn))
- inform (DECL_SOURCE_LOCATION (fn), "\t%#D", fn);
+ inform (DECL_SOURCE_LOCATION (fn), "\t%#qD", fn);
/* Now truncate the vector. This leaves it non-null, so we know
there are pure virtuals, but empty so we don't list them out
diff --git a/gcc/hsa-gen.c b/gcc/hsa-gen.c
index 7b69d64..4b85e0b 100644
--- a/gcc/hsa-gen.c
+++ b/gcc/hsa-gen.c
@@ -587,7 +587,7 @@ hsa_type_for_scalar_tree_type (const_tree type, bool min32int)
{
HSA_SORRY_ATV (EXPR_LOCATION (type),
"support for HSA does not implement huge or "
- "variable-sized type %T", type);
+ "variable-sized type %qT", type);
return res;
}
@@ -616,7 +616,7 @@ hsa_type_for_scalar_tree_type (const_tree type, bool min32int)
if (res == BRIG_TYPE_NONE)
{
HSA_SORRY_ATV (EXPR_LOCATION (type),
- "support for HSA does not implement type %T", type);
+ "support for HSA does not implement type %qT", type);
return res;
}
@@ -628,7 +628,7 @@ hsa_type_for_scalar_tree_type (const_tree type, bool min32int)
{
HSA_SORRY_ATV (EXPR_LOCATION (type),
"support for HSA does not implement a vector type "
- "where a type and unit size are equal: %T", type);
+ "where a type and unit size are equal: %qT", type);
return res;
}
@@ -645,7 +645,7 @@ hsa_type_for_scalar_tree_type (const_tree type, bool min32int)
break;
default:
HSA_SORRY_ATV (EXPR_LOCATION (type),
- "support for HSA does not implement type %T", type);
+ "support for HSA does not implement type %qT", type);
}
}
@@ -704,7 +704,7 @@ hsa_type_for_tree_type (const_tree type, unsigned HOST_WIDE_INT *dim_p = NULL,
if (!tree_fits_uhwi_p (TYPE_SIZE_UNIT (type)))
{
HSA_SORRY_ATV (EXPR_LOCATION (type), "support for HSA does not "
- "implement huge or variable-sized type %T", type);
+ "implement huge or variable-sized type %qT", type);
return BRIG_TYPE_NONE;
}
@@ -732,8 +732,8 @@ hsa_type_for_tree_type (const_tree type, unsigned HOST_WIDE_INT *dim_p = NULL,
|| !tree_fits_shwi_p (TYPE_MAX_VALUE (domain)))
{
HSA_SORRY_ATV (EXPR_LOCATION (type),
- "support for HSA does not implement array %T with "
- "unknown bounds", type);
+ "support for HSA does not implement array "
+ "%qT with unknown bounds", type);
return BRIG_TYPE_NONE;
}
HOST_WIDE_INT min = tree_to_shwi (TYPE_MIN_VALUE (domain));
@@ -3485,14 +3485,14 @@ verify_function_arguments (tree decl)
if (DECL_STATIC_CHAIN (decl))
{
HSA_SORRY_ATV (EXPR_LOCATION (decl),
- "HSA does not support nested functions: %D", decl);
+ "HSA does not support nested functions: %qD", decl);
return;
}
else if (!TYPE_ARG_TYPES (type) || stdarg_p (type))
{
HSA_SORRY_ATV (EXPR_LOCATION (decl),
"HSA does not support functions with variadic arguments "
- "(or unknown return type): %D", decl);
+ "(or unknown return type): %qD", decl);
return;
}
}
diff --git a/gcc/objc/ChangeLog b/gcc/objc/ChangeLog
index 1e74b4b..5649ddc 100644
--- a/gcc/objc/ChangeLog
+++ b/gcc/objc/ChangeLog
@@ -1,3 +1,11 @@
+2017-05-04 Martin Sebor <msebor@redhat.com>
+
+ PR translation/80280
+ * objc-gnu-runtime-abi-01.c (objc_eh_runtime_type): Add missing
+ quoting to directives.
+ * objc-next-runtime-abi-01.c (objc_eh_runtime_type): Ditto.
+ * objc-next-runtime-abi-02.c (next_runtime_02_eh_type): Ditto.
+
2017-01-01 Jakub Jelinek <jakub@redhat.com>
Update copyright years.
diff --git a/gcc/objc/objc-gnu-runtime-abi-01.c b/gcc/objc/objc-gnu-runtime-abi-01.c
index 6d655f2..beeec58 100644
--- a/gcc/objc/objc-gnu-runtime-abi-01.c
+++ b/gcc/objc/objc-gnu-runtime-abi-01.c
@@ -2165,7 +2165,7 @@ objc_eh_runtime_type (tree type)
we use the c++ typeinfo decl. */
return build_eh_type_type (type);
#else
- error ("non-objective-c type '%T' cannot be caught", type);
+ error ("non-objective-c type %qT cannot be caught", type);
ident = get_identifier ("ErrorMarkNode");
goto make_err_class;
#endif
diff --git a/gcc/objc/objc-next-runtime-abi-01.c b/gcc/objc/objc-next-runtime-abi-01.c
index 3ffbb46..7aff788 100644
--- a/gcc/objc/objc-next-runtime-abi-01.c
+++ b/gcc/objc/objc-next-runtime-abi-01.c
@@ -2812,7 +2812,7 @@ objc_eh_runtime_type (tree type)
we use c++'s typeinfo decl. */
return build_eh_type_type (type);
#else
- error ("non-objective-c type '%T' cannot be caught", type);
+ error ("non-objective-c type %qT cannot be caught", type);
ident = get_identifier ("ErrorMarkNode");
goto make_err_class;
#endif
diff --git a/gcc/objc/objc-next-runtime-abi-02.c b/gcc/objc/objc-next-runtime-abi-02.c
index d206a6a..9731486 100644
--- a/gcc/objc/objc-next-runtime-abi-02.c
+++ b/gcc/objc/objc-next-runtime-abi-02.c
@@ -3584,7 +3584,7 @@ next_runtime_02_eh_type (tree type)
case, we use c++'s typeinfo decl. */
return build_eh_type_type (type);
#else
- error ("non-objective-c type '%T' cannot be caught", type);
+ error ("non-objective-c type %qT cannot be caught", type);
goto err_mark_in;
#endif
}
diff --git a/gcc/symtab.c b/gcc/symtab.c
index 342cc36..6c41dcf 100644
--- a/gcc/symtab.c
+++ b/gcc/symtab.c
@@ -296,7 +296,7 @@ symbol_table::change_decl_assembler_name (tree decl, tree name)
const char *old_name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl));
if (TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl))
&& DECL_RTL_SET_P (decl))
- warning (0, "%D renamed after being referenced in assembly", decl);
+ warning (0, "%qD renamed after being referenced in assembly", decl);
SET_DECL_ASSEMBLER_NAME (decl, name);
if (alias)
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index feb65d5..a4d3c32 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,11 @@
+2017-05-04 Martin Sebor <msebor@redhat.com>
+
+ PR translation/80280
+ * g++.dg/abi/Wabi-2-3.C: Adjust.
+ * g++.dg/abi/Wabi-3-2.C: Ditto.
+ * g++.dg/lookup/using17.C: Ditto.
+ * gcc.dg/format/gcc_diag-1.c (foo): Ditto.
+
2017-05-04 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/80622
diff --git a/gcc/testsuite/g++.dg/abi/Wabi-2-3.C b/gcc/testsuite/g++.dg/abi/Wabi-2-3.C
index 96a0f22..d7af979 100644
--- a/gcc/testsuite/g++.dg/abi/Wabi-2-3.C
+++ b/gcc/testsuite/g++.dg/abi/Wabi-2-3.C
@@ -12,5 +12,5 @@ template <int &> struct S { };
// Expect the diagnostic to reference the ABI version specified via
// -fabi-version=3 and the ABI version specified via -Wabi=2.
-void foo (S<N>) { } // { dg-warning "the mangled name of .void foo\\(S<N>\\). changed between -fabi-version=2 \\(_Z3foo1SILZ1NEE\\) and -fabi-version=3 \\(_Z3foo1SIL_Z1NEE\\)" }
+void foo (S<N>) { } // { dg-warning "the mangled name of .void foo\\(S<N>\\). changed between .-fabi-version=2. \\(._Z3foo1SILZ1NEE.\\) and .-fabi-version=3. \\(._Z3foo1SIL_Z1NEE.\\)" }
diff --git a/gcc/testsuite/g++.dg/abi/Wabi-3-2.C b/gcc/testsuite/g++.dg/abi/Wabi-3-2.C
index 46bd713..703b277 100644
--- a/gcc/testsuite/g++.dg/abi/Wabi-3-2.C
+++ b/gcc/testsuite/g++.dg/abi/Wabi-3-2.C
@@ -12,5 +12,5 @@ template <int &> struct S { };
// Expect the diagnostic to reference the ABI version specified via
// -fabi-version=2 and the ABI version specified via -Wabi=3.
-void foo (S<N>) { } // { dg-warning "the mangled name of .void foo\\(S<N>\\). changes between -fabi-version=2 \\(_Z3foo1SILZ1NEE\\) and -fabi-version=3 \\(_Z3foo1SIL_Z1NEE\\)" }
+void foo (S<N>) { } // { dg-warning "the mangled name of .void foo\\(S<N>\\). changes between .-fabi-version=2. \\(._Z3foo1SILZ1NEE.\\) and .-fabi-version=3. \\(._Z3foo1SIL_Z1NEE.\\)" }
diff --git a/gcc/testsuite/g++.dg/lookup/using17.C b/gcc/testsuite/g++.dg/lookup/using17.C
index 9b008fe..ec2f551 100644
--- a/gcc/testsuite/g++.dg/lookup/using17.C
+++ b/gcc/testsuite/g++.dg/lookup/using17.C
@@ -3,11 +3,11 @@
// { dg-do compile }
namespace M {
- struct S {}; // { dg-message "struct M::S" "candidate 2" }
+ struct S {}; // { dg-message ".struct M::S." "candidate 2" }
}
int S;
-struct S {}; // { dg-message "candidates are: struct S" "candidate 1" }
+struct S {}; // { dg-message "candidates are: .struct S." "candidate 1" }
using namespace M;
diff --git a/gcc/testsuite/gcc.dg/format/gcc_diag-1.c b/gcc/testsuite/gcc.dg/format/gcc_diag-1.c
index f4922cd..4dcdb05 100644
--- a/gcc/testsuite/gcc.dg/format/gcc_diag-1.c
+++ b/gcc/testsuite/gcc.dg/format/gcc_diag-1.c
@@ -70,20 +70,21 @@ foo (int i, int i1, int i2, unsigned int u, double d, char *s, void *p,
cdiag ("%m");
cxxdiag ("%m");
- tdiag ("%D%F%T%V", t1, t1, t1, t1);
- tdiag ("%+D%+F%+T%+V", t1, t1, t1, t1);
+ /* Quote directives to avoid "warning: conversion used unquoted." */
+ tdiag ("%<%D%F%T%V%>", t1, t1, t1, t1);
+ tdiag ("%<%+D%+F%+T%+V%>", t1, t1, t1, t1);
tdiag ("%q+D%q+F%q+T%q+V", t1, t1, t1, t1);
- tdiag ("%D%D%D%D", t1, t2, *t3, t4[5]);
- cdiag ("%D%F%T%V", t1, t1, t1, t1);
- cdiag ("%+D%+F%+T%+V", t1, t1, t1, t1);
+ tdiag ("%<%D%D%D%D%>", t1, t2, *t3, t4[5]);
+ cdiag ("%<%D%F%T%V%>", t1, t1, t1, t1);
+ cdiag ("%<%+D%+F%+T%+V%>", t1, t1, t1, t1);
cdiag ("%q+D%q+F%q+T%q+V", t1, t1, t1, t1);
- cdiag ("%D%D%D%D", t1, t2, *t3, t4[5]);
- cdiag ("%E", t1);
- cxxdiag ("%A%D%E%F%T%V", t1, t1, t1, t1, t1, t1);
- cxxdiag ("%D%D%D%D", t1, t2, *t3, t4[5]);
- cxxdiag ("%#A%#D%#E%#F%#T%#V", t1, t1, t1, t1, t1, t1);
- cxxdiag ("%+A%+D%+E%+F%+T%+V", t1, t1, t1, t1, t1, t1);
- cxxdiag ("%+#A%+#D%+#E%+#F%+#T%+#V", t1, t1, t1, t1, t1, t1);
+ cdiag ("%<%D%D%D%D%>", t1, t2, *t3, t4[5]);
+ cdiag ("%<%E%>", t1);
+ cxxdiag ("%<%A%D%E%F%T%V%>", t1, t1, t1, t1, t1, t1);
+ cxxdiag ("%<%D%D%D%D%>", t1, t2, *t3, t4[5]);
+ cxxdiag ("%<%#A%#D%#E%#F%#T%#V%>", t1, t1, t1, t1, t1, t1);
+ cxxdiag ("%<%+A%+D%+E%+F%+T%+V%>", t1, t1, t1, t1, t1, t1);
+ cxxdiag ("%<%+#A%+#D%+#E%+#F%+#T%+#V%>", t1, t1, t1, t1, t1, t1);
cxxdiag ("%C%L%O%P%Q", i, i, i, i, i);
tdiag ("%v%qv%#v", i, i, i);
@@ -113,7 +114,7 @@ foo (int i, int i1, int i2, unsigned int u, double d, char *s, void *p,
tdiag ("%#D", t1); /* { dg-warning "format" "bogus modifier" } */
cdiag ("%A", t1); /* { dg-warning "format" "bogus tree" } */
cdiag ("%#D", t1); /* { dg-warning "format" "bogus modifier" } */
- cdiag ("%+D", t1);
+ cdiag ("%<%+D%>", t1);
cxxdiag ("%C"); /* { dg-warning "format" "missing arg" } */
cxxdiag ("%C", l); /* { dg-warning "format" "wrong arg" } */
cxxdiag ("%C", i, i); /* { dg-warning "format" "extra arg" } */
diff --git a/gcc/varasm.c b/gcc/varasm.c
index 05e48a5..096871d 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -320,15 +320,15 @@ get_section (const char *name, unsigned int flags, tree decl)
&& decl != sect->named.decl)
{
if (decl != NULL && DECL_P (decl))
- error ("%+D causes a section type conflict with %D",
+ error ("%+qD causes a section type conflict with %qD",
decl, sect->named.decl);
else
- error ("section type conflict with %D", sect->named.decl);
+ error ("section type conflict with %qD", sect->named.decl);
inform (DECL_SOURCE_LOCATION (sect->named.decl),
"%qD was declared here", sect->named.decl);
}
else if (decl != NULL && DECL_P (decl))
- error ("%+D causes a section type conflict", decl);
+ error ("%+qD causes a section type conflict", decl);
else
error ("section type conflict");
/* Make sure we don't error about one section multiple times. */
@@ -5383,7 +5383,7 @@ mark_weak (tree decl)
struct symtab_node *n = symtab_node::get (decl);
if (n && n->refuse_visibility_changes)
- error ("%+D declared weak after being used", decl);
+ error ("%+qD declared weak after being used", decl);
DECL_WEAK (decl) = 1;
if (DECL_RTL_SET_P (decl)