diff options
author | Gabriel Dos Reis <gdr@integrable-solutions.net> | 2004-10-04 15:07:50 +0000 |
---|---|---|
committer | Gabriel Dos Reis <gdr@gcc.gnu.org> | 2004-10-04 15:07:50 +0000 |
commit | 15a7ee2932a7cd29a99772a01c07182f1f1f2bf0 (patch) | |
tree | aa851870e550289504febd18f3972ebc085b595c /gcc/cp/friend.c | |
parent | 095527632980f0c9838466134cb6e837dd87c103 (diff) | |
download | gcc-15a7ee2932a7cd29a99772a01c07182f1f1f2bf0.zip gcc-15a7ee2932a7cd29a99772a01c07182f1f1f2bf0.tar.gz gcc-15a7ee2932a7cd29a99772a01c07182f1f1f2bf0.tar.bz2 |
Convert diagnostics to use quoting flag q 4/n
Convert diagnostics to use quoting flag q 4/n
* except.c (decl_is_java_type, build_throw,
is_admissible_throw_operand, check_handlers_1,
check_handlers):
Use quoting formats.
* friend.c (add_friend, make_friend_class, do_friend):
Likewise.
* init.c (sort_mem_initializers, emit_mem_initializers,
member_init_ok_or_else, expand_member_init, is_aggr_type,
build_offset_ref, build_java_class_ref): Likewise.
From-SVN: r88511
Diffstat (limited to 'gcc/cp/friend.c')
-rw-r--r-- | gcc/cp/friend.c | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/gcc/cp/friend.c b/gcc/cp/friend.c index 1310a93..6ab9d73 100644 --- a/gcc/cp/friend.c +++ b/gcc/cp/friend.c @@ -149,7 +149,7 @@ add_friend (tree type, tree decl, bool complain) if (decl == TREE_VALUE (friends)) { if (complain) - warning ("`%D' is already a friend of class `%T'", + warning ("%qD is already a friend of class %qT", decl, type); return; } @@ -201,7 +201,7 @@ make_friend_class (tree type, tree friend_type, bool complain) if (! IS_AGGR_TYPE (friend_type)) { - error ("invalid type `%T' declared `friend'", friend_type); + error ("invalid type %qT declared %<friend%>", friend_type); return; } @@ -217,7 +217,7 @@ make_friend_class (tree type, tree friend_type, bool complain) /* [temp.friend] Friend declarations shall not declare partial specializations. */ - error ("partial specialization `%T' declared `friend'", + error ("partial specialization %qT declared %<friend%>", friend_type); return; } @@ -227,7 +227,7 @@ make_friend_class (tree type, tree friend_type, bool complain) else if (same_type_p (type, friend_type)) { if (complain) - pedwarn ("class `%T' is implicitly friends with itself", + pedwarn ("class %qT is implicitly friends with itself", type); return; } @@ -245,19 +245,19 @@ make_friend_class (tree type, tree friend_type, bool complain) else if (TREE_CODE (friend_type) == TYPENAME_TYPE) { /* template <class T> friend typename S<T>::X; */ - error ("typename type `%#T' declared `friend'", friend_type); + error ("typename type %q#T declared %<friend%>", friend_type); return; } else if (TREE_CODE (friend_type) == TEMPLATE_TYPE_PARM) { /* template <class T> friend class T; */ - error ("template parameter type `%T' declared `friend'", friend_type); + error ("template parameter type %qT declared %<friend%>", friend_type); return; } else if (!CLASSTYPE_TEMPLATE_INFO (friend_type)) { /* template <class T> friend class A; where A is not a template */ - error ("`%#T' is not a template", friend_type); + error ("%q#T is not a template", friend_type); return; } @@ -276,8 +276,7 @@ make_friend_class (tree type, tree friend_type, bool complain) if (friend_type == probe) { if (complain) - warning ("`%D' is already a friend of `%T'", - probe, type); + warning ("%qD is already a friend of %qT", probe, type); break; } } @@ -286,8 +285,7 @@ make_friend_class (tree type, tree friend_type, bool complain) if (same_type_p (probe, friend_type)) { if (complain) - warning ("`%T' is already a friend of `%T'", - probe, type); + warning ("%qT is already a friend of %qT", probe, type); break; } } @@ -411,7 +409,7 @@ do_friend (tree ctype, tree declarator, tree decl, add_friend (current_class_type, decl, /*complain=*/true); } else - error ("member `%D' declared as friend before type `%T' defined", + error ("member %qD declared as friend before type %qT defined", decl, ctype); } /* A global friend. @@ -467,10 +465,14 @@ do_friend (tree ctype, tree declarator, tree decl, if (warn) { static int explained; - warning ("friend declaration `%#D' declares a non-template function", decl); + warning ("friend declaration %q#D declares a non-template " + "function", decl); if (! explained) { - warning ("(if this is not what you intended, make sure the function template has already been declared and add <> after the function name here) -Wno-non-template-friend disables this warning"); + warning ("(if this is not what you intended, make sure " + "the function template has already been declared " + "and add <> after the function name here) " + "-Wno-non-template-friend disables this warning"); explained = 1; } } |