aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/friend.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/friend.c')
-rw-r--r--gcc/cp/friend.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/gcc/cp/friend.c b/gcc/cp/friend.c
index bc946e8..68484e5 100644
--- a/gcc/cp/friend.c
+++ b/gcc/cp/friend.c
@@ -548,14 +548,13 @@ do_friend (tree ctype, tree declarator, tree decl,
if (warn)
{
static int explained;
- warning (0, "friend declaration %q#D declares a non-template "
- "function", decl);
+ warning (OPT_Wnon_template_friend, "friend declaration "
+ "%q#D declares a non-template function", decl);
if (! explained)
{
- warning (0, "(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");
+ inform ("(if this is not what you intended, make sure "
+ "the function template has already been declared "
+ "and add <> after the function name here) ");
explained = 1;
}
}