PR c++/9602
* typeck2.c (abstract_virtuals_error): Don't check when we
are processing a template.
* g++.dg/template/friend16.C: New test.
From-SVN: r63361
+2003-02-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
+
+ PR c++/9602
+ * typeck2.c (abstract_virtuals_error): Don't check when we
+ are processing a template.
+
2003-02-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/7982
tree u;
tree tu;
+ if (processing_template_decl)
+ /* If we are processing a template, TYPE may be a template
+ class where CLASSTYPE_PURE_VIRTUALS always contains
+ inline friends. */
+ return 0;
+
if (!CLASS_TYPE_P (type) || !CLASSTYPE_PURE_VIRTUALS (type))
return 0;
+2003-02-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
+
+ PR c++/9602
+ * g++.dg/template/friend16.C: New test.
+
2003-02-23 Hans-Peter Nilsson <hp@axis.com>
* gcc.dg/asmreg-1.c: New test.
--- /dev/null
+// { dg-do compile }
+
+// Origin: Wolfgang Bangerth <bangerth@ticam.utexas.edu>
+
+// PR c++/9602: Inline friend/pure virtual tree data sharing in
+// class template.
+
+template <typename T> struct X {
+ void foo (X);
+ friend void bar () {}
+};
+
+template <typename T>
+void X<T>::foo (X x) {}
+
+template struct X<int>;