* decl.c (wrapup_globals_for_namespace): Don't complain about friend
pseudo-template instantiations.
From-SVN: r243862
+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
&& 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),
--- /dev/null
+// { dg-options -Wunused-function }
+
+namespace
+{
+ template <class T> struct A
+ {
+ friend void f(A) { }
+ };
+
+ A<int> a;
+}