+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):
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;
|| 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;
+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
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);
}
}
{
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;
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"),
+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.
{
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);
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;
}
{
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;
if (warn_abi)
{
+ const char fabi_version[] = "-fabi-version";
+
if (flag_abi_compat_version != warn_abi_version
|| id2 == NULL_TREE)
{
&& 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;
{
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);
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;
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
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;
}
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))
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);
{
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);
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);
}
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:;
}
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;
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
{
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;
}
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;
}
{
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;
}
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);
}
}
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;
}
|| !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));
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;
}
}
+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.
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
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
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
}
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)
+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
// 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.\\)" }
// 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.\\)" }
// { 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;
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);
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" } */
&& 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. */
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)