aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Oliva <oliva@dcc.unicamp.br>1998-10-06 00:24:05 +0000
committerAlexandre Oliva <oliva@gcc.gnu.org>1998-10-06 00:24:05 +0000
commit0eaae86cabfda78baec29e96a461f6bc52f60e6e (patch)
treec74d700f9d854407e6d659bb2fe3041c21fec551
parent40208b1c3a69fc0f5859c930ab5a785dbc3ca8b6 (diff)
downloadgcc-0eaae86cabfda78baec29e96a461f6bc52f60e6e.zip
gcc-0eaae86cabfda78baec29e96a461f6bc52f60e6e.tar.gz
gcc-0eaae86cabfda78baec29e96a461f6bc52f60e6e.tar.bz2
friend35.C: New test.
* 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
-rw-r--r--gcc/testsuite/ChangeLog6
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/friend35.C7
2 files changed, 13 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 763aadf..f4b1b58 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -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
index 0000000..0a28f3a
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.pt/friend35.C
@@ -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);