mirror of git://gcc.gnu.org/git/gcc.git
PR c++/78749 - friend in anonymous namespace
* decl.c (wrapup_globals_for_namespace): Don't complain about friend pseudo-template instantiations. From-SVN: r243862
This commit is contained in:
parent
d697acca12
commit
8f0db5664a
|
|
@ -1,3 +1,9 @@
|
|||
2016-12-21 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/78749 - friend in anonymous namespace
|
||||
* decl.c (wrapup_globals_for_namespace): Don't complain about friend
|
||||
pseudo-template instantiations.
|
||||
|
||||
2016-12-16 Richard Biener <rguenther@suse.de>
|
||||
|
||||
PR c++/71694
|
||||
|
|
|
|||
|
|
@ -926,6 +926,7 @@ wrapup_globals_for_namespace (tree name_space, void* data ATTRIBUTE_UNUSED)
|
|||
&& DECL_EXTERNAL (decl)
|
||||
&& !TREE_PUBLIC (decl)
|
||||
&& !DECL_ARTIFICIAL (decl)
|
||||
&& !DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION (decl)
|
||||
&& !TREE_NO_WARNING (decl))
|
||||
{
|
||||
warning_at (DECL_SOURCE_LOCATION (decl),
|
||||
|
|
|
|||
|
|
@ -0,0 +1,11 @@
|
|||
// { dg-options -Wunused-function }
|
||||
|
||||
namespace
|
||||
{
|
||||
template <class T> struct A
|
||||
{
|
||||
friend void f(A) { }
|
||||
};
|
||||
|
||||
A<int> a;
|
||||
}
|
||||
Loading…
Reference in New Issue