friend35.C: New test.
authorAlexandre Oliva <oliva@dcc.unicamp.br>
Tue, 6 Oct 1998 00:24:05 +0000 (00:24 +0000)
committerAlexandre Oliva <oliva@gcc.gnu.org>
Tue, 6 Oct 1998 00:24:05 +0000 (00:24 +0000)
* g++.old-deja/g++.pt/friend35.C: New test.  A template function
  must be declared before its specializations can be named in friend
  declarations.

From-SVN: r22861

gcc/testsuite/ChangeLog
gcc/testsuite/g++.old-deja/g++.pt/friend35.C [new file with mode: 0644]

index 763aadf50a69c3457af484d66ca64bebdc41d866..f4b1b58c1d0375d0f8820d1ce6862ede4b57df4b 100644 (file)
@@ -1,3 +1,9 @@
+1998-10-06  Alexandre Oliva  <oliva@dcc.unicamp.br>
+
+       * g++.old-deja/g++.pt/friend35.C: New test.  A template function
+       must be declared before its specializations can be named in friend
+       declarations.
+
 1998-10-05  Dave Love  <d.love@dl.ac.uk>
 
        * g77.f-torture/execute/u77-test.f: Add regression test for RAND.
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/friend35.C b/gcc/testsuite/g++.old-deja/g++.pt/friend35.C
new file mode 100644 (file)
index 0000000..0a28f3a
--- /dev/null
@@ -0,0 +1,7 @@
+// Build don't link:
+
+class foo {
+  friend void bar<int>(int); // ERROR - must be declared first - XFAIL *-*-*
+};
+
+template <typename T> void bar(T);