diff options
author | Dirk Mueller <dmueller@suse.de> | 2007-02-12 23:55:17 +0000 |
---|---|---|
committer | Dirk Mueller <mueller@gcc.gnu.org> | 2007-02-12 23:55:17 +0000 |
commit | 20af23d30305d78a824937b67a2cca2bde36eff2 (patch) | |
tree | 3f30f283a3a0b801b021517c3e49f7d7347a47fa /gcc | |
parent | 40b86e5f2cf069832e23043992dedb0bf8e0dcd6 (diff) | |
download | gcc-20af23d30305d78a824937b67a2cca2bde36eff2.zip gcc-20af23d30305d78a824937b67a2cca2bde36eff2.tar.gz gcc-20af23d30305d78a824937b67a2cca2bde36eff2.tar.bz2 |
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/friend.c | 11 |
2 files changed, 11 insertions, 6 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index b7d5973..342a7ba 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -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> 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; } } |