summaryrefslogtreecommitdiff
path: root/gcc/cp/friend.c
diff options
context:
space:
mode:
authormueller <mueller@138bc75d-0d04-0410-961f-82ee72b054a4>2007-02-12 23:55:17 +0000
committermueller <mueller@138bc75d-0d04-0410-961f-82ee72b054a4>2007-02-12 23:55:17 +0000
commitb02f0a26d61ac4abbe77525cac889d05a98ef956 (patch)
tree3f30f283a3a0b801b021517c3e49f7d7347a47fa /gcc/cp/friend.c
parentc3c147306bab7d0e29422e18cc8ab58a031fd4ad (diff)
downloadgcc-b02f0a26d61ac4abbe77525cac889d05a98ef956.tar.gz
2007-02-13 Dirk Mueller <dmueller@suse.de>
* friend.c (do_friend): Annotate warning about friend declarations in templates with OPT_Wnon_template_friend. Convert informal message from warning() to inform(). git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@121867 138bc75d-0d04-0410-961f-82ee72b054a4
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 bc946e8a527..68484e50760 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;
}
}