* typeck.c (build_x_unary_op, convert_member_func_to_ptr,
get_delta_difference): Use new quotation style.
* repo.c (reopen_repo_file_for_write): Likewise.
* pt.c (do_type_instantiation): Likewise.
* parser.c (cp_parser_diagnose_invalid_type_name):
* name-lookup.c (push_overloaded_decl, set_decl_namespace):
* error.c (cp_print_error_function,
print_instantiation_full_context): Likewise.
* decl.c (define_label, grok_reference_init,
maybe_deduce_size_from_array_init, revert_static_member_fn):
* decl2.c (check_classfn): Likewise.
* class.c (add_method, check_field_decls, layout_class_type,
resolve_address_of_overloaded_function): Likewise.
* call.c (build_x_va_arg, build_over_call): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@89938
138bc75d-0d04-0410-961f-
82ee72b054a4
2004-10-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
+ Convert diagnostics to use quoting flag q 9/n
+ * typeck.c (build_x_unary_op, convert_member_func_to_ptr,
+ get_delta_difference): Use new quotation style.
+ * repo.c (reopen_repo_file_for_write): Likewise.
+ * pt.c (do_type_instantiation): Likewise.
+ * parser.c (cp_parser_diagnose_invalid_type_name):
+ * name-lookup.c (push_overloaded_decl, set_decl_namespace):
+ * error.c (cp_print_error_function,
+ print_instantiation_full_context): Likewise.
+ * decl.c (define_label, grok_reference_init,
+ maybe_deduce_size_from_array_init, revert_static_member_fn):
+ * decl2.c (check_classfn): Likewise.
+ * class.c (add_method, check_field_decls, layout_class_type,
+ resolve_address_of_overloaded_function): Likewise.
+ * call.c (build_x_va_arg, build_over_call): Likewise.
+
+2004-10-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
+
Convert diagnostics to use quoting flag q 8/n
* cvt.c (cp_convert_to_pointer, warn_ref_binding,
convert_to_reference, ocp_convert, convert_to_void
- cp_convert_to_pointer):
+ cp_convert_to_pointer): Use new quotation style.
2004-10-31 Mark Mitchell <mark@codesourcery.com>
if (! pod_type_p (type))
{
/* Undefined behavior [expr.call] 5.2.2/7. */
- warning ("cannot receive objects of non-POD type %q#T' through %<...%>; "
+ warning ("cannot receive objects of non-POD type %q#T through %<...%>; "
"call will abort at runtime", type);
expr = convert (build_pointer_type (type), null_node);
expr = build2 (COMPOUND_EXPR, TREE_TYPE (expr),
tree base_binfo;
if (convs[i]->bad_p)
- pedwarn ("passing `%T' as `this' argument of `%#D' discards qualifiers",
- TREE_TYPE (argtype), fn);
+ pedwarn ("passing %qT as %<this%> argument of %q#D discards qualifiers",
+ TREE_TYPE (argtype), fn);
/* [class.mfct.nonstatic]: If a nonstatic member function of a class
X is called for an object that is not of type X, or of a type
return;
else
{
- cp_error_at ("`%#D' and `%#D' cannot be overloaded",
+ cp_error_at ("%q#D and %q#D cannot be overloaded",
method, fn);
/* We don't call duplicate_decls here to merge
}
if (TREE_CODE (type) == REFERENCE_TYPE)
{
- cp_error_at ("%qD may not have reference type `%T' because it is a member of a union",
+ cp_error_at ("%qD may not have reference type %qT because"
+ " it is a member of a union",
x, type);
continue;
}
else
{
if (warn_abi && TREE_CODE (t) == UNION_TYPE)
- warning ("size assigned to `%T' may not be "
+ warning ("size assigned to %qT may not be "
"ABI-compliant and may change in a future "
"version of GCC",
t);
else
{
if (flags & tf_error)
- error ("\
-cannot resolve overloaded function `%D' based on conversion to type `%T'",
- DECL_NAME (OVL_FUNCTION (overload)), target_type);
+ error ("cannot resolve overloaded function %qD based on"
+ " conversion to type %qT",
+ DECL_NAME (OVL_FUNCTION (overload)), target_type);
return error_mark_node;
}
pedwarn ("label named wchar_t");
if (DECL_INITIAL (decl) != NULL_TREE)
- error ("duplicate label `%D'", decl);
+ error ("duplicate label %qD", decl);
else
{
/* Mark label as having been defined. */
if ((DECL_LANG_SPECIFIC (decl) == 0
|| DECL_IN_AGGR_P (decl) == 0)
&& ! DECL_THIS_EXTERN (decl))
- error ("`%D' declared as reference but not initialized", decl);
+ error ("%qD declared as reference but not initialized", decl);
return NULL_TREE;
}
if (failure == 2)
{
if (do_default)
- error ("array size missing in `%D'", decl);
+ error ("array size missing in %qD", decl);
/* If a `static' var's size isn't known, make it extern as
well as static, so it does not get allocated. If it's not
`static', then don't mark it extern; finish_incomplete_decl
if (cp_type_quals (TREE_TYPE (TREE_VALUE (args)))
!= TYPE_UNQUALIFIED)
- error ("static member function `%#D' declared with type qualifiers",
- decl);
+ error ("static member function %q#D declared with type qualifiers", decl);
args = TREE_CHAIN (args);
tmp = build_function_type (TREE_TYPE (function), args);
pop_scope (ctype);
if (fndecls)
return OVL_CURRENT (fndecls);
- error ("prototype for `%#D' does not match any in class `%T'",
+ error ("prototype for %q#D does not match any in class %qT",
function, ctype);
is_conv_op = DECL_CONV_FN_P (fndecl);
if (current_function_decl == NULL)
pp_base_string (context->printer, "At global scope:");
else
- pp_printf (context->printer, "In %s `%s':",
+ pp_printf (context->printer, "In %s %qs:",
function_category (current_function_decl),
cxx_printable_name (current_function_decl, 2));
pp_base_newline (context->printer);
/* Avoid redundancy with the the "In function" line. */;
else
pp_verbatim (context->printer,
- "%s: In instantiation of `%s':\n",
+ "%s: In instantiation of %qs:\n",
LOCATION_FILE (location),
decl_as_string (TINST_DECL (p),
TFF_DECL_SPECIFIERS | TFF_RETURN_TYPE));
if (IS_AGGR_TYPE (t) && warn_shadow
&& (! DECL_IN_SYSTEM_HEADER (decl)
|| ! DECL_IN_SYSTEM_HEADER (old)))
- warning ("`%#D' hides constructor for `%#T'", decl, t);
+ warning ("%q#D hides constructor for %q#T", decl, t);
old = NULL_TREE;
}
else if (is_overloaded_fn (old))
/* It is ok for friends to be qualified in parallel space. */
if (!friendp && !is_ancestor (current_namespace, scope))
- error ("declaration of `%D' not in a namespace surrounding `%D'",
- decl, scope);
+ error ("declaration of %qD not in a namespace surrounding %qD",
+ decl, scope);
DECL_CONTEXT (decl) = FROB_CONTEXT (scope);
if (scope != current_namespace)
{
if (TREE_CODE (field) == TYPE_DECL
&& DECL_NAME (field) == id)
{
- inform ("(perhaps `typename %T::%E' was intended)",
+ inform ("(perhaps %<typename %T::%E%> was intended)",
BINFO_TYPE (b), id);
break;
}
if (storage != NULL_TREE)
{
if (pedantic && !in_system_header)
- pedwarn("ISO C++ forbids the use of `%E' on explicit instantiations",
+ pedwarn("ISO C++ forbids the use of %qE on explicit instantiations",
storage);
if (storage == ridpointers[(int) RID_INLINE])
if (repo_file == 0)
{
- error ("can't create repository information file `%s'", repo_name);
+ error ("can't create repository information file %qs", repo_name);
flag_use_repository = 0;
}
}
{
if (TREE_CODE (xarg) != OFFSET_REF)
{
- error ("invalid use of '%E' to form a pointer-to-member-function. Use a qualified-id.",
+ error ("invalid use of %qE to form a pointer-to-member-function."
+ " Use a qualified-id.",
xarg);
return error_mark_node;
}
else
{
- error ("parenthesis around '%E' cannot be used to form a pointer-to-member-function",
+ error ("parenthesis around %qE cannot be used to form a"
+ " pointer-to-member-function",
xarg);
PTRMEM_OK_P (xarg) = 1;
}
|| TREE_CODE (intype) == METHOD_TYPE);
if (pedantic || warn_pmf2ptr)
- pedwarn ("converting from `%T' to `%T'", intype, type);
+ pedwarn ("converting from %qT to %qT", intype, type);
if (TREE_CODE (intype) == METHOD_TYPE)
expr = build_addr_func (expr);
virt_binfo = binfo_from_vbase (binfo);
if (virt_binfo)
/* This is a reinterpret cast, we choose to do nothing. */
- warning ("pointer to member cast via virtual base `%T'",
+ warning ("pointer to member cast via virtual base %qT",
BINFO_TYPE (virt_binfo));
else
result = size_diffop (size_zero_node, BINFO_OFFSET (binfo));