[patch] Fix PR59295 -- move redundant friend decl warning under -Wredundant-decls
Greetings, To fix PR59295, this patch moves (generally useless) warning about repeated / redundant friend declarations under -Wredundant-decls. Tested on Linux/x86_64 with no regressions. Ok for trunk once it opens in stage 1? Thanks, -- 2014-03-21 Paul Pluzhnikov PR c++/59295 * gcc/cp/friend.c (add_friend, make_friend_class): Move repeated friend warning under Wredundant_decls. Index: gcc/cp/friend.c === --- gcc/cp/friend.c (revision 208748) +++ gcc/cp/friend.c (working copy) @@ -148,7 +148,8 @@ if (decl == TREE_VALUE (friends)) { if (complain) - warning (0, "%qD is already a friend of class %qT", + warning (OPT_Wredundant_decls, +"%qD is already a friend of class %qT", decl, type); return; } @@ -376,7 +377,8 @@ if (friend_type == probe) { if (complain) - warning (0, "%qD is already a friend of %qT", probe, type); + warning (OPT_Wredundant_decls, +"%qD is already a friend of %qT", probe, type); break; } } @@ -385,7 +387,8 @@ if (same_type_p (probe, friend_type)) { if (complain) - warning (0, "%qT is already a friend of %qT", probe, type); + warning (OPT_Wredundant_decls, +"%qT is already a friend of %qT", probe, type); break; } }
Re: [patch] Fix PR59295 -- move redundant friend decl warning under -Wredundant-decls
Ping? On Fri, Mar 21, 2014 at 9:16 AM, Paul Pluzhnikov wrote: > Greetings, > > To fix PR59295, this patch moves (generally useless) warning about > repeated / redundant friend declarations under -Wredundant-decls. > > Tested on Linux/x86_64 with no regressions. > > Ok for trunk once it opens in stage 1? Which has just happened. > > Thanks, > > -- > > 2014-03-21 Paul Pluzhnikov > > PR c++/59295 > * gcc/cp/friend.c (add_friend, make_friend_class): Move repeated > friend warning under Wredundant_decls. > > Index: gcc/cp/friend.c > === > --- gcc/cp/friend.c (revision 208748) > +++ gcc/cp/friend.c (working copy) > @@ -148,7 +148,8 @@ > if (decl == TREE_VALUE (friends)) > { > if (complain) > - warning (0, "%qD is already a friend of class %qT", > + warning (OPT_Wredundant_decls, > +"%qD is already a friend of class %qT", > decl, type); > return; > } > @@ -376,7 +377,8 @@ > if (friend_type == probe) > { > if (complain) > - warning (0, "%qD is already a friend of %qT", probe, type); > + warning (OPT_Wredundant_decls, > +"%qD is already a friend of %qT", probe, type); > break; > } > } > @@ -385,7 +387,8 @@ > if (same_type_p (probe, friend_type)) > { > if (complain) > - warning (0, "%qT is already a friend of %qT", probe, type); > + warning (OPT_Wredundant_decls, > +"%qT is already a friend of %qT", probe, type); > break; > } > } -- Paul Pluzhnikov
Re: [patch] Fix PR59295 -- move redundant friend decl warning under -Wredundant-decls
On Fri, Apr 11, 2014 at 09:20:13AM -0700, Paul Pluzhnikov wrote: > > To fix PR59295, this patch moves (generally useless) warning about > > repeated / redundant friend declarations under -Wredundant-decls. > > > > Tested on Linux/x86_64 with no regressions. > > > > Ok for trunk once it opens in stage 1? > > Which has just happened. CCing Jason as C++ maintainer. > > 2014-03-21 Paul Pluzhnikov > > > > PR c++/59295 > > * gcc/cp/friend.c (add_friend, make_friend_class): Move repeated > > friend warning under Wredundant_decls. No gcc/cp/ prefix in the ChangeLog entry. Jakub
Re: [patch] Fix PR59295 -- move redundant friend decl warning under -Wredundant-decls
On 03/21/2014 12:16 PM, Paul Pluzhnikov wrote: Ok for trunk once it opens in stage 1? OK. Jason