friend.c (do_friend): Annotate warning about friend declarations in templates with...
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(). From-SVN: r121867
This commit is contained in:
parent
40b86e5f2c
commit
20af23d303
@ -1,3 +1,9 @@
|
||||
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().
|
||||
|
||||
2007-02-12 Simon Martin <simartin@users.sourceforge.net>
|
||||
Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user